@model DetailSelectionViewModel @(Html.Kendo().DropDownListFor(m => m) .DataValueField("Id") .DataTextField("Name") .Value(Model.Selected) .Events(e => { e.Select("SelectionDropDownItemSelected"); e.DataBound("SelectionDropDownDataBound"); }) .DataSource(dataSource => dataSource .Read(read => read.Action("GetDetailList", "DataWorksheet")) ) )
Above is the drop down that I have embedded within a detail grid. When a value is changed in the master grid I need to traverse through all the detail rows and change the selected item in the dropdown list in each row.
So I successfully traverse the dataitems bound to the detailgrid. The dropdown appears to be changed until you actually click on the dropdown list and the dropdown appears with the selecteditem still being the item that was selected when the grid was originally rendered. When I click on the dropdown the Read Action occurs and the data is retrieved and the dropdown is bound, but the selected value isnt set to the new value desired.
Thinking that I can traverse the dataitems and set the values there. Think I need to traverse the datagrid itself and find the dropdown list in each row and programmatically choose the selected value. I see no sample code to one traverse the datagrid that is a child when parent changed. I see no sample code to find the dropdown list in a datagrid row.
My logic starts when the datasource change event occurs for the parent grid.
Can anyone assist please. These tasks cant be that uncommon.