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

EnableViewState = false Column Resize on Postback

3 Answers 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tod
Top achievements
Rank 1
Tod asked on 21 May 2014, 01:08 PM
Hello,

We are having a problem with the grid not maintaining column width on postback when you set EnableViewState = false. If I enable the property it works. However, there are other problems that occur if we leave it enabled.

We were running on the last 2012 build up until now. I noticed in the 2013.1.220 release notes this: "Fixed:EnableViewState property of RadGrid does not turn off the ViewState of RadGrid instanceā€. And according to this documentation http://www.telerik.com/help/aspnet-ajax/grid-viewstate-optimization.html, various column properties are maintained even with the property set to false.

To recreate the problem all you need to do is create a declarative grid and set EnableViewState=false and hookup the onColumnResize event to postback. 

Also, if you reorder columns first and then resize a column, the order will reset.

Any help would be appreciated.

Blair

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 26 May 2014, 11:03 AM
Hello Tod,

I tried to replicate the issue you are describing using the online demo below by disabling the RadGrid ViewState, but to no avail.
I would suggest you to revise the online example and  verify what  the difference in your case is:
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/column-row-resize-reorder/defaultcs.aspx

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tod
Top achievements
Rank 1
answered on 26 May 2014, 01:56 PM
Hi Maria,

You say you disabled the EnableViewState, but did you wire up the client onColumnResize event to cause a postback? That's where the problem occurs. We need the postback on resize because we persist grid settings.

I looked at the demo and did not see the spinner when I resized it. So, I'm not sure if the demo does a postback.


Thanks.
0
Maria Ilieva
Telerik team
answered on 29 May 2014, 03:12 PM
Hello Tod ,

After modifying the demo and invoke manual ajaxRequest OnColumnResizing client event a js error appear an this exactly is causing the width resting issue. The mentioned error appear on my end no matter if the ViewState is enabled or disabled.
It appears that this is a bug in the RadGrid control which I'm forwarding to our Dev team for further investigation.

Thank you for your cooperation.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Tod
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Tod
Top achievements
Rank 1
Share this question
or