i ve two columns in radgrid
column a-radgriddropdowncolumn
column b-radgriddropdowncolumn
for scenario-- while selecting the value from column A i want to add items on Column B on Client selectedindexchanges event
but the same is not working for dropdown to dropdown binding
column a-radgriddropdowncolumn
column b-radgriddropdowncolumn
for scenario-- while selecting the value from column A i want to add items on Column B on Client selectedindexchanges event
| design |
| <telerik:GridDropDownColumn DataField="Year" HeaderText="Year" UniqueName="Year" /> |
| <telerik:GridDropDownColumn DataField="Month" HeaderText="Month" UniqueName="Month" /> |
| server side inside the item created |
| GridDropDownListColumnEditor drp = (GridDropDownListColumnEditor)item.EditManager.GetColumnEditor(strArray[k]); |
| drp.ComboBoxControl.ID = "Yr"; |
| drp.ComboBoxControl.OnClientSelectedIndexChanged += "OnClientYearSelectedIndexChanged"; |
| RadComboBox txt = (item.EditManager.GetColumnEditor("Month") as GridDropDownListColumnEditor).ComboBoxControl; |
| txt.ID = "Month"; |
| java script |
| function OnClientYearSelectedIndexChanged(sender, eventArgs) |
| { |
| var combo=$get(sender.get_id().replace("Yr", "Month")); |
| var comboItem = new Telerik.Web.UI.RadComboBoxItem(); |
| comboItem.set_text("vanthudichi"); |
| combo.get_items().add(comboItem); |
combo.get_item().add(comboItem)-->getting arror in this line like no property is available
i ve done the same for fetching the value on textbox from dropdownvalue client selectedindexchanged event ,its working fine
| javascript |
| var txt = $get(sender.get_id().replace("pgm", "StartTime")); |
| var txt2 = $get(sender.get_id().replace("pgm", "Endtime")); |
| var txt3 = $get(sender.get_id().replace("pgm", "PrimeTime")); |
| var txt4 = $get(sender.get_id().replace("pgm", "Contract_New_Rate")); |
| if(res != null) |
| { |
| txt.value=res[0]; |
| txt2.value=res[1]; |
| txt3.value=res[2]; |
| } |
| sever side item created |
| GridDropDownListColumnEditor drp = (GridDropDownListColumnEditor)item.EditManager.GetColumnEditor(strArray[k]); |
| drp.ComboBoxControl.ID = "pgm"; |
| drp.ComboBoxControl.OnClientSelectedIndexChanged += "OnClientSelectedIndexChanged"; |
| TextBox txt = (item.EditManager.GetColumnEditor("StartTime") as GridTextBoxColumnEditor).TextBoxControl; |
| txt.ID = "StartTime"; |
| TextBox txt2 = (item.EditManager.GetColumnEditor("Endtime") as GridTextBoxColumnEditor).TextBoxControl; |
| txt2.ID = "Endtime"; |
| TextBox txt3 = (item.EditManager.GetColumnEditor("PrimeTime") as GridTextBoxColumnEditor).TextBoxControl; |
| txt3.ID = "PrimeTime"; |
| TextBox txt4 = (item.EditManager.GetColumnEditor("Contract_New_Rate") as GridTextBoxColumnEditor).TextBoxControl; |
| txt4.ID = "Contract_New_Rate"; |
| drp.ComboBoxControl.Filter = RadComboBoxFilter.StartsWith; |
| drp.ComboBoxControl.EmptyMessage = "--Select--"; |
but the same is not working for dropdown to dropdown binding