Hi,
With Regards,
Babul
I want to disable/enable RadComboBox on item selection changes of another RadCombobox.
I am trying to achieve this by using below code snippet, but getting error "Disable()" is not a valid method.
| <rad:RadComboBox id="Combo1" runat="server" OnClientSelectedIndexChanging="LoadCombo2"> |
| <Items> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem1"></rad:RadComboBoxItem> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem2"></rad:RadComboBoxItem> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem3"></rad:RadComboBoxItem> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem4"></rad:RadComboBoxItem> |
| </Items> |
| </rad:RadComboBox> |
| <rad:RadComboBox id="Combo2" runat="server" OnClientItemsRequested="SetCombo2"> |
| <Items> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem1"></rad:RadComboBoxItem> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem2"></rad:RadComboBoxItem> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem3"></rad:RadComboBoxItem> |
| <rad:RadComboBoxItem runat="server" Text="RadComboBoxItem4"></rad:RadComboBoxItem> |
| </Items> |
| </rad:RadComboBox> |
| <script type="text/javascript"> |
| var ThisCombo2 = <%= Combo2.ClientID %>; |
| function LoadCombo2(item) { |
| ThisCombo2.Disable(); |
| ThisCombo2.ClearSelection(); |
| ThisCombo2.RequestItems(item.Value, false); } |
| function SetCombo2(item) { |
| item.SetText(item.Items[0].Text); |
| item.Enable(); |
| if (item.Items.length > 1) { item.ShowDropDown(); } } </script> |
With Regards,
Babul