how enable radlistbox item in client side which is disabled in server side

2 posts, 0 answers
  1. Dhamodharan
    Dhamodharan avatar
    300 posts
    Member since:
    Sep 2010

    Posted 17 Jun 2011 Link to this post


    I am using radlistbox item disable in server side. but i want enable client side while some value changed. but i am getting enable client side but the text has been shared(like disabled time). how to solve this problem,

    Please let me know,

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jun 2011 Link to this post

    Hello Dhamu,

    In order to preserve the changes after postback you need to call trackChanges and commitChanges.
    <telerik:RadListBox ID="RadListBox2" CssClass="Large" runat="server" EnableDragAndDrop="true"
                AllowTransfer="true" ButtonSettings-ShowDelete="true">
          <telerik:RadListBoxItem Text="Argentina" />
          <telerik:RadListBoxItem Text="Australia" />
          <telerik:RadListBoxItem Text="Brazil" Selected="true" />
          <telerik:RadListBoxItem Text="Canada" />
          <telerik:RadListBoxItem Text="Chile" />
          <telerik:RadListBoxItem Text="China" />
    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    <asp:Button ID="Button2" runat="server" Text="Disable form client side" OnClientClick="disable();" />

    protected void Button1_Click(object sender, EventArgs e)
         RadListBoxItem item=RadListBox2.FindItemByText("Canada");
         item.Enabled = false;

    function disable()
           var listBox = $find('<%= RadListBox2.ClientID%>');

  3. DevCraft R3 2016 release webinar banner
Back to Top