Hi,
I am trying to load a grid from a search button, and it is working great in my view. Then this grid has a nested grid. The nested grid should have a button that upon selected gets a column from the parent grid and a column from the child grid and redirect to a different view (controller action).
Parent grid:
Child Grid:
The problem is whenever I click on the arrow to load child grid, it automatically calls the js function "DirectToPdfCreator" even though I didn't click on the select button in the child grid. Please advice and thanks in advance.
Shehab
I am trying to load a grid from a search button, and it is working great in my view. Then this grid has a nested grid. The nested grid should have a button that upon selected gets a column from the parent grid and a column from the child grid and redirect to a different view (controller action).
Parent grid:
@(Html.Kendo().Grid(Model.Names)
.Name("gridPatients")
.Columns(col =>
{
col.Bound(m => m.NAME_FIRST).Title("First Name");
col.Bound(m => m.NAME_LAST).Title("Last Name");
col.Bound(m => m.SEX).Title("SEX");
col.Bound(m => m.DOB).Title("DOB");
col.Bound(m => m.MRN).Title("MRN");
col.Bound(m => m.PERSON_ID).Title("Person ID").Hidden();
})
.Pageable()
.Sortable()
.ClientDetailTemplateId("TheVisits")
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.ServerOperation(false)
)
)
Child Grid:
@(Html.Kendo().Grid(Model.PatientVisitsModel.ENCOUNTERS)
.Name("grid_#=PERSON_ID#")
.Columns(col =>
{
col.Bound(m => m.FIN).Title("FIN");
col.Bound(m => m.BEG_EFFECTIVE_DT_TM).Title("Admit Date");
col.Bound(m => m.LOCATION).Title("Location");
col.Bound(m => m.STATUS).Title("Status");
col.Command(c => c.Custom("Select").Click("DirectToPdfCreator(#=PERSON_ID#)"));
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Read(read => read.Action("_TheVisits", "PatientSearch", new { PERSON_ID = "#=PERSON_ID#" }))
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
The problem is whenever I click on the arrow to load child grid, it automatically calls the js function "DirectToPdfCreator" even though I didn't click on the select button in the child grid. Please advice and thanks in advance.
Shehab