This is a migrated thread and some comments may be shown as answers.

CheckBox in header template for expan all

1 Answer 71 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
shabbir mohammad
Top achievements
Rank 1
shabbir mohammad asked on 21 Apr 2011, 02:59 PM
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.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 27 Apr 2011, 10:04 AM
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.

Tags
TreeList
Asked by
shabbir mohammad
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or