Hi,
I would like to filter grid 2 based on the row selection in the first grid and First grid has primary key called CustID and second grid has foreign key CustID.
Please advise how i can achieve this. Thank you
First Grid:
@(Html.Kendo().Grid(Model)
.Name("SList")
.HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
.Columns(columns => {
columns.Bound(p => p.CCID);
columns.Bound(p => p.CRN);
columns.Bound(p => p.CFirstName).Width(140);
columns.Bound(p => p.CFamilyName).Width(140);
columns.Bound(p => p.Alias).Width(45);
columns.Bound(p => p.CGender).Width(45);
columns.Bound(p => p.CAge).Width(45);
columns.Bound(p => p.CDOB).Format("{0:MM/dd/yyyy}");
columns.Bound(p => p.RDate).Format("{0:MM/dd/yyyy}");
columns.Bound(p => p.RFrom);
columns.Bound(p => p.RComments);
columns.Bound(p => p.ReferralTo);
columns.Bound(p => p.CStatusID);
columns.Bound(p => p.DateScheduled).Format("{0:MM/dd/yyyy}");
columns.Command(commands => commands.Edit()).Width(175);
})
//.ToolBar(toolBar => toolBar.Save())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model => model.Id(p => p.CustID))
.Read(read => read.Action("Index", "Management"))
.Update(update => update.Action("Edit", "Management"))
)
)
Second Grid:
@(Html.Kendo().Grid(Model)
.Name("SList2")
.HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
.Columns(columns => {
columns.Bound(p => p.CreateDate).Format("{0:MM/dd/yyyy}");
columns.Bound(p => p.CreateBy);
columns.Bound(p => p.C3).Width(140);
columns.Command(commands => commands.Edit()).Width(175);
})
//.ToolBar(toolBar => toolBar.Save())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model => model.Id(p => p.CEventID))
.Read(read => read.Action("Index", "Management"))
.Update(update => update.Action("Edit", "Management"))
)
)
I would like to filter grid 2 based on the row selection in the first grid and First grid has primary key called CustID and second grid has foreign key CustID.
Please advise how i can achieve this. Thank you
First Grid:
@(Html.Kendo().Grid(Model)
.Name("SList")
.HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
.Columns(columns => {
columns.Bound(p => p.CCID);
columns.Bound(p => p.CRN);
columns.Bound(p => p.CFirstName).Width(140);
columns.Bound(p => p.CFamilyName).Width(140);
columns.Bound(p => p.Alias).Width(45);
columns.Bound(p => p.CGender).Width(45);
columns.Bound(p => p.CAge).Width(45);
columns.Bound(p => p.CDOB).Format("{0:MM/dd/yyyy}");
columns.Bound(p => p.RDate).Format("{0:MM/dd/yyyy}");
columns.Bound(p => p.RFrom);
columns.Bound(p => p.RComments);
columns.Bound(p => p.ReferralTo);
columns.Bound(p => p.CStatusID);
columns.Bound(p => p.DateScheduled).Format("{0:MM/dd/yyyy}");
columns.Command(commands => commands.Edit()).Width(175);
})
//.ToolBar(toolBar => toolBar.Save())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model => model.Id(p => p.CustID))
.Read(read => read.Action("Index", "Management"))
.Update(update => update.Action("Edit", "Management"))
)
)
Second Grid:
@(Html.Kendo().Grid(Model)
.Name("SList2")
.HtmlAttributes(new { @Style = "align:center; font-size:10px;" })
.Columns(columns => {
columns.Bound(p => p.CreateDate).Format("{0:MM/dd/yyyy}");
columns.Bound(p => p.CreateBy);
columns.Bound(p => p.C3).Width(140);
columns.Command(commands => commands.Edit()).Width(175);
})
//.ToolBar(toolBar => toolBar.Save())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Model(model => model.Id(p => p.CEventID))
.Read(read => read.Action("Index", "Management"))
.Update(update => update.Action("Edit", "Management"))
)
)