Hi,
I have seen some examples where you use the .Query function in a grid to pass an extra parameter to the controller. This works well for me but I can't seem to find an example of passing something other than a hardcoded value. For example, if I had a couple of date picker control likes this:
@Html.EJ().DatePicker("ScanDateFrom").EnablePersistence(true).WatermarkText("Scan Date From").Value(ViewBag.datevalue)
@Html.EJ().DatePicker("ScanDateTo").EnablePersistence(true).WatermarkText("Scan Date To").Value(ViewBag.datevalue)
How would I pass those values to the controller when rendering my grid?
@(Html.EJ().Grid<object>("ResponseRatesByState")
.ToolbarSettings(toolBar => toolBar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.ExcelExport);
}))
.Mappers(map => map.ExportToExcelAction("ExportStateGrid"))
// .ClientSideEvents(events => events.Load("onLoad").DataBound("dataBound"))
.Datasource(ds => ds.URL(@Url.Action("ResponseRateByState"))
.Adaptor(AdaptorType.UrlAdaptor))
.AllowPaging()
.Query("new ej.Query().addParams('scandate', ???????)")