Hello,
I have a RadGrid and when adding anew record, there are some of cascade dropdown. Once a selection is made in "Record Type", then the dropdown below, "Sub-Type" rebinds to the data source and displays only relevant records.
Code below (it works correctly, I am just adding it as a reference to understand the issue I am experiencing):
Protected Sub RecordType_SelectedIndexChanged(ByVal sender As Object, ByVal e As DropDownListEventArgs)
Dim combo As RadDropDownList = TryCast(sender, RadDropDownList)
Dim container As GridEditableItem = TryCast(combo.NamingContainer, GridEditableItem)
Dim workProductCombo As RadDropDownList = TryCast(container.FindControl("SubTypeDropDown"), RadDropDownList)
If Not workProductCombo Is Nothing Then
SqlDataSource7.SelectCommand = "SELECT [Sub_Type] FROM [Record_Sub_Type] WHERE [id]=(SELECT [ID] from [Record_Type1] where [Record_Type]='" & combo.SelectedValue & "') OR [ID]=0 ORDER BY [Sub_Type] ASC"
SqlDataSource7.DataBind()
workProductCombo.DataBind()
workProductCombo.ClearSelection()
End If
End Sub
Action on grid when adding new record:
Everything works correctly but.... grid is flickering when dropdown selection triggers a data source rebind. How to avoid this? I tied to "ajaxify" the grid as follows, but no result.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Since you have a formal support ticket submitted for the same issue, I suggest that we investigate the problem there, and once we found the solution we share it in the forum as well.