or
| <script language="javascript" type="text/javascript"> |
| var oldConfirm = radconfirm; |
| window.radconfirm = function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) |
| { |
| var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually |
| //Cancel the event |
| ev.cancelBubble = true; |
| ev.returnValue = false; |
| if (ev.stopPropagation) ev.stopPropagation(); |
| if (ev.preventDefault) ev.preventDefault(); |
| //Determine who is the caller |
| var callerObj = ev.srcElement ? ev.srcElement : ev.target; |
| //Call the original radconfirm and pass it all necessary parameters |
| if (callerObj) |
| { |
| //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again. |
| var callBackFn = function (arg) |
| { |
| if (arg) |
| { |
| callerObj["onclick"] = ""; |
| if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz |
| else if (callerObj.tagName == "A") //We assume it is a link button! |
| { |
| try |
| { |
| eval(callerObj.href) |
| } |
| catch(e){} |
| } |
| } |
| } |
| oldConfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); |
| } |
| return false; |
| } |
| </script> |
| 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?