or
| 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--"; |
Hi all.
Webservice renders a control and returns it in string. Using js when I paste it on the page, the javascript functions are not evaluated. How can I do that?
In Telerik XmlHttpPanel there is a EnableClientScriptEvaluation. How to do it without using this control?We need to expand the items for one level as default by page load .
We have the following code snippet in order to expand the first item when page loads in C#:
protected void RadPanelBar1_DataBound(object sender, EventArgs e)
{
RadPanelBar1.Items[0].Expanded = true;
}
Please can you give equivalent javascript code for this source.
Thanks