I have a grid as below
Now the grid loads empty at starup which is ok. But if the user clicks the grid header then also the underlying controller action gets called which is not desirable. I want the grid to get populated on button click which its doing fine.
Please help me to find where I am going wrong.
@{
Html.Kendo().Grid<
InEnumerable........
>()
.Name("IniParamGrid")
.HtmlAttributes(new { style = "width: 100%;" })
.Events(events => events.DataBound("Grid_onRowDataBound"))
.Events(events => events.Change("Grid_OnRowSelectUID"))
.AutoBind(false)
.Columns(col =>
{
col.Bound("NP_PARAM_UID").Hidden();
col.Bound("PROCESS_GRP").Title("Process Group").HeaderHtmlAttributes(new { style = "text-align:center;" });
col.Bound("PARAM_NAME").Title("Parameter Name").HeaderHtmlAttributes(new { style = "text-align:center;" });
col.Bound("PARAM_VALUE").Title("Parameter Value").HeaderHtmlAttributes(new { style = "text-align:center;" });
col.Bound("EXTERNAL_ID").Title("Table Name").HeaderHtmlAttributes(new { style = "text-align:center;" });
col.Bound("EXTERNAL_FK").Title("Key Value").HeaderHtmlAttributes(new { style = "text-align:center;" });
col.Bound("DEL_FLG").Hidden();
})
.DataSource(dataBinding =>
{
dataBinding.Ajax().Read(read => read.Action("SrchDataIniParam", "Admin",
new
{
area = "Admin",
strParam1 = ViewBag.Param1
}))
.ServerOperation(false);
})
.Resizable(resizing => resizing.Columns(true))
.Selectable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable()
.Sortable()
.Filterable()
.Render();
}
Now the grid loads empty at starup which is ok. But if the user clicks the grid header then also the underlying controller action gets called which is not desirable. I want the grid to get populated on button click which its doing fine.
Please help me to find where I am going wrong.