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

Hidden columns visible on post back

1 Answer 59 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Aetna
Top achievements
Rank 1
Aetna asked on 30 Nov 2012, 05:05 PM
Hi,

I am hiding a number of columns, TreeListSelectColumn and TreeListButtonColumn on ItemDatabound. When the page does a postback or async postback the columns reappear?

Any suggestions much appreciated,

Regards
Ross

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 05 Dec 2012, 07:41 AM
Hi Ross,

The ItemDataBound event is fired only when the control is rebound, however when the control is not rebound on postback the event is not fired and all cells’ values are populated from the ViewState. So if you hide some columns on ItemDataBound and then perform postback without rebinding the control the columns will be visible, because the code into ItemDataBound event will not be executed. To achieve the desired functionality you could try hiding the columns on ItemCreated event. Please give it try and let me know if it helps you.

Looking forward for your reply.

Kind regards,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeList
Asked by
Aetna
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or