| <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" /> |
| <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" /> |
| <telerik:RadSpell ID="RadSpellControl" runat="server" ButtonType="None" SupportedLanguages="en-US,English" /> |
| <asp:Button ID="Button1" runat="server" Text="SpellCheck" OnClientClick="return StartSpellCheck();" |
| <script type="text/javascript"> |
| function MultipleTextboxSource(sources) { |
| this._sources = sources; |
| this.get_text = function() { |
| var texts = []; |
| for (var i = 0; i < this._sources.length; i++) { |
| texts[texts.length] = this._sources[i].get_text(); |
| } |
| return texts.join("<controlSeparator><br/></controlSeparator>"); |
| } |
| this.set_text = function(text) { |
| var texttexts = text.split("<controlSeparator><br/></controlSeparator>"); |
| for (var i = 0; i < this._sources.length; i++) { |
| this._sources[i].set_text(texts[i]); |
| } |
| } |
| } |
| function StartSpellCheck() { |
| var radSpell = $find('ctl00_ctl00_RadSpellControl'); |
| var textboxes = $(':text'); |
| var HtmlElementSources = []; |
| for (var i = 0; i < textboxes.length; i++) { |
| HtmlElementSources[i] = new Telerik.Web.UI.Spell.HtmlElementTextSource($get(textboxes[i].id)); |
| } |
| radSpell.set_textSource(new MultipleTextboxSource(HtmlElementSources)); |
| radSpell.startSpellCheck(); |
| return false; |
| } |
| function SetLanguage(e) { |
| ee = e || window.event; |
| var target = e.target || e.srcElement; |
| var radSpell = GetRadSpell('ctl00_ctl00_RadSpell1'); |
| radSpell.DictionaryLanguage = target.value; |
| } |
| </script> |
| 87 this.set_element({value:""}) |
| 88 }else{if(b.nodeName=="IFRAME"&&b.contentWindow!=null {this.set_element(b.contentWindow.document.body) |
| 89 }}b=null |
| 90 },dispose:function(){this._element=null; |
| 91 Telerik.Web.UI.Spell.HtmlElementTextSource.callBaseMethod(this,"dispose") |
| 92 },get_text:function(){var d=""; this.get_element() is null |
| 93 if(this.get_element().value!=null){try{d=this.get_element().value |
| 94 }catch(c){alert("Error getting text from control.\n"+c.message) |
| 95 }}else{if(this.get_element().innerHTML!=null {try{d=this.get_element().innerHTML |
| 96 }catch(c){alert("Error getting HTML from the control.\n"+c.message) |
| 97 }}else{alert("No value or innerHTML attribute. Cannot access text.") |
| 98 }}return d |

I seem to be having a problem when I have a RadAjaxPanel that contains a submit button. Whenever that submit button is click, Page_load gets fired twice. First time around IsPostBack is false, then it gets call the second time around where IsPostBack is true. When I took that button outside of the RadAjaxPanel, then IsPostBack is working properly.
In otherwords, i need to have a way of differentiating if it's a Ajax Request.
Please advice.
In my aspx page, i have the following sample:-
| <telerik:RadAjaxPanel runat="server" ID="RadTestPanel" Width="100%"> |
| <asp:Button ID="btnTest" runat="server" Text="Add" Font-Names="Calibri" |
| Width="60px" OnClick="btnTest_Click" /> |
| </telerik:RadAjaxPanel> |
| protected override void Page_Load(object sender, EventArgs e) |
| { |
| if (!this.IsPostBack) //Problem lies here such that it's always false when click within the RadAjaxPanel and get's called twice. Why is that? |
| { |
| DoSomeFirstTimeInitialization(); |
| } |
| } |
<telerik:RadComboBox ID="ClientCB" DataSourceID="ClientList" DataTextField="Client"
DataValueField="ClientKey" AppendDataBoundItems="true" runat="server" Skin="Outlook"
Width="250px" AutoPostBack="true"
onselectedindexchanged="ClientCB_SelectedIndexChanged">
</telerik:RadComboBox>
<telerik:RadComboBox ID="UsrCB" DataSourceID="TrainUserList" DataTextField="FullName"
DataValueField="ID" AppendDataBoundItems="true" runat="server" Skin="Outlook"
Width="250px" AutoPostBack="true" onselectedindexchanged="UsrCB_SelectedIndexChanged">
</telerik:RadComboBox>
I want a selection in the ClientCB to force the UsrCB to reload with new data. Here are the DataSources:
<asp:SqlDataSource ID="ClientList" runat="server" ConnectionString=""
SelectCommand="Generic_ClientList" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
<asp:SqlDataSource ID="TrainUserList" runat="server" ConnectionString=""
SelectCommand="Train_TrainUserList" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="0" Name="ClientKey" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
This is my server side code:
protected void ClientCB_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
TrainUserList.SelectParameters["ClientKey"].DefaultValue = e.Value;
RadComboBox ThisCB = o as RadComboBox;
RadComboBox TUsrCB = ThisCB.Parent.FindControl("UsrCB") as RadComboBox;
TUsrCB.DataBind();
}
| if (appointmentData.RecurrenceParentID != null) |
| { |
| appointmentData.RecurrenceParentID = new Guid?(new Guid(appointmentData.RecurrenceParentID.ToString())); |
| } |

