My issue is that I need to set the selected value of a nested DropDownList inside a Telerik MVC Grid Control. Since the grid is bound on the client I need to set the selected item of the dropdown list in the "onDrpLoad" event on the client.
What would be the correct way to set the selected index for the dropdown list below? It is also important that when the selected item in the dropdown list is set is does NOT cause the "onDrpChange" event to fire. The "onDrpChange" event also needs to access(send to the server) the AssistantId of the assistant that was selected when the event fires.
Is there a clean simple way to do this?
Html.Telerik().Grid<Person>()
.Name("Grid)
.DataBinding(dataBinding => dataBinding.Ajax().Select("GetDetails","Person"))
.Columns(columns =>
columns.Bound(p => p.AssistantId).ClientTemplate(
Html.Telerik().DropDownList()
.Name("AssistantList_<#= PersonId #>")
.BindTo(new SelectList(AssistantController.GetAssistants()))
.ClientEvents(events =>
events.OnLoad("onDrpLoad");
events.OnChange("onDrpChange");
)
.ToHtmlString()
);
Thanks.