Hi,I'm creating a grid and I want to call an action which accept some parameters. So I have my grid :
@(Html.Infragistics()
.Grid<SGridModel>()
.ID("pcd-grid")
.AutoGenerateColumns(false)
.RenderCheckboxes(true)
.PrimaryKey("Id")
.EnableUTCDates(false)
.Columns(column =>
{
column.For(x => x.Id).Column.Hidden = true;
column.For(x => x.Type).HeaderText("Type").Width("10%").DataType("bool");
})
.DataSourceUrl(Url.Action("GetSub", "Sub",
, new { startTime = Model.StartTime, endTime = Model.EndTime }
))
.Render()
)
ACTION:
[GridDataSourceAction]
public ActionResult GetSubmittedList(DateTime startDate, DateTime endDate)
...
}
How to do it? Thank you
Hello,
The values can be sent as querystring parameters to the control. Here is a link with more information on how to read query parameters from the control:
http://stackoverflow.com/questions/11488249/use-querystring-variables-in-mvc-controller