Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
Add Grid datasourceurl route value
posted

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

Parents
No Data
Reply
  • 2525
    posted

    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

Children
No Data