CheckBox in header template for expan all

2 posts, 0 answers
  1. shabbir mohammad
    shabbir mohammad avatar
    7 posts
    Member since:
    Jan 2010

    Posted 21 Apr 2011 Link to this post

    Hi:

    I have implemented a checkbox to expand all nodes in a TreeList. The checkbox resides within the header template. On the event "checkedChanged" of the checkBox , I call the server side method "Expand ALL".

    Now, when I check the  'expand all' checkbox the tree expands as expected. But after postback the 'Checked' state of the checkbox is not preserved.Meaning, after the expansion the checkbox check state becomes 'UnChecked' (The tick mark disappears). I would like to preserve the checked state so that on un-checking it I can collaplse the tree back.

    I tried saving the state in viewState and assign it back after postback. But it did not work. 

    Could any one point me to the right direction?

    Also it would be nice if someone could show me how to access programmatically the checkbox from within the header Template

    Thanks
    Shabbir.
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 27 Apr 2011 Link to this post

    Hi Shabbir,

    To accomplish this task you can intercept the action execution in the CheckChanged event of the header CheckBox as demonstrated in the code library below:
    http://www.telerik.com/community/code-library/aspnet-ajax/grid/selectall-option-in-grid-header-along-with-individual-group-selection.aspx

    Please give it a try and let me know if it helps to achieve your goal.

    Best wishes,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top