I wish to disable my radcombobox whilst the page loads, this is within a "usercontrol" and I am using jquery in the main page (which includes this control), and can use it here if that helps?
This returns a null reference for the combobox! I have looked at many threads to no avail, hopefully you can post an example for me.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="buyersguidefinderUserControl.ascx.cs"
<telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true" runat="server" Width="250px"
Height="300px" Filter="Contains" LoadingMessage="Finding Buyers Guide ..." EmptyMessage="Type which guide you would like to read..."
<div class="guidesearchbtn fl">
<asp:Button ID="Button1" runat="server" Text="Go" OnClick="Button1_Click" /></div>
// disable control otherwise it breaks page state
var combo = $find("<%= RadComboBox1.ClientID %>");
9 Answers, 1 is accepted
Using the declarative disabled/client onload method worked great.
Could you possibly point me to the docs on explaining the page lifecycle and how / when we can hook into telerik controls using jquery if required. If not, could someone blog about best pratices?
Client pageLoad always fires AFTER Server-side Page_Load event and before Serer-Side Page_PreRender. Therefore, I usually utilise Server-Side Page_Load for any initialisation that deemed necessary, through an 'If Not IsPostBack' block. However, if I wish to handle initilisation on Client, I pass a value to a HiddenField during the 'If Not IsPostBack' then capture said value on Client during pageLoad, do whatever intialisation required then clear the HiddenField. This way, I avoid processing intialisation on every pageLoad on client (i.e. simulating 'Not IsPostBack').
If you have a Master page, then the sequence would be as follows (I think):
- Master Server-side Page_Load.
- Content Page Server-side Page_Load.
- Client pageLoad.
As for links, I believe MSDN has a thorough documentation on page lifecycle, but can't recall the links now. May be Telerik folks could assist here.
Hope this helps.
And thank you Saed for your comments above, it is all helpful.
How disable the Telerik Radcombobox using jquery on ready method of jquery .