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

Not working EXpand/Collapse in Dynamic created columns

2 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Akhil Raj
Top achievements
Rank 1
Akhil Raj asked on 26 Feb 2010, 04:14 AM
hi all,
  I created one rad grid at dynamically. Rad grid fixed static and dynamically added columns in page_load event. For more information about this work around is specified my last post the follwoing thread:

http://www.telerik.com/community/forums/aspnet-ajax/grid/dynamic-template-column-for-command-not-firing-event.aspx

Now i can view hierachical grid accoriding to the xml i gave. with expand and collapse button. But when press  expand button it showing the even validation error. if evenvalidation = false showinf somw 'Is Operator' error. I think because of not haveing view state or somw thing like So can you please tell how can i explicetly handle expand and collapse or any other solution to handle this?

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Feb 2010, 07:50 AM
Hi,

"Some operations in Telerik RadGrid like data extraction through theExtractValuesFromItem method, grouping, hierarchical views expand/collapse, automatic data source operations, custom edit forms (WebUserControl and FormTemplate) or filtering require that the EnableViewState is set to true."

Please enable the ViewState of the gr id to ensure that it works properly.

Thanks,
Princy
0
Akhil Raj
Top achievements
Rank 1
answered on 01 Mar 2010, 05:28 AM
thanks friend for the help. Yes i know that some of the operations including expandcollapse not work with out viewstate.

Your link sample is good. But i created the columns in page_load event (actually when press button i forcly submit the form with some boolean value to chek in page_load and  create the columns) So to work i disable columnviewstate is false. I think because of this i cannot get the expandcollpase column in prerender to set the visible false. And also i cant create template column in page load to display custom expandxollapse column. So is any possiblity in my scenario to work arounf expand collapse colum. or can i change the scenario ?
Tags
Grid
Asked by
Akhil Raj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Akhil Raj
Top achievements
Rank 1
Share this question
or