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

[Solved] IE7 Retain Column Width after postback

4 Answers 142 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 22 Jul 2013, 01:53 PM
My client is requiring me to develop in IE7. The issue is that in IE7 when a user changes the column width and then chooses an action such as sort, the column size goes back to default width, rather than retaining the width the user selected.

4 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 23 Jul 2013, 02:32 AM
I just completed some testing. I have 4 invisible columns that contain Ids. When I remove these columns the grid saves column resize on postback. Any ideas??!
0
Deyan Enchev
Telerik team
answered on 25 Jul 2013, 10:59 AM

Hi Michael,

I was able to recreate the abnormality in a local test and unfortunately we have to confirm that this is an issue in the present version of our controls. In my case I was able to corrupt the column resizing  even without performing postback.

We will do everything possible to address it soon as this issue has been forwarded to our Development team.
In the meantime a temporary solution can be to use Visible="false" instead of Display="false" for a column property.

Here is a link to the issue I have reported so you can track its status.

As appreciation for reporting us this issue, I updated your Telerik points accordingly.

Regards,
Deyan Enchev
Telerik
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 the blog feed now.
0
Michael
Top achievements
Rank 1
answered on 31 Jul 2013, 12:56 AM
Deyan Thank you for looking into this. Yes visible=false does fix part of the issue but using that property won't allow the id of the columns to be rendered server side
0
Deyan Enchev
Telerik team
answered on 31 Jul 2013, 02:24 PM
Hi Michael,

The observed behaviour is expected because since Q1 2013 cell data is not stored in the ViewState of the grid when the column is hidden(Visible=”false). You can read more about this breaking change here.

In your case best would be using DataKeyNames property in order to have values stored in the ViewState. This means that they are available at any moment.

“…If the Visible property of a column field is set to false, the column is not displayed in the GridTableView control and the data for the column does not make a round trip to the client. If you want the data for a column that is not visible to make a round trip, add the field name to the DataKeyNames property…”

Our online help explains how this can be done.

Regards,
Deyan Enchev
Telerik
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 the blog feed now.
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Deyan Enchev
Telerik team
Share this question
or