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

[Solved] Determine Column Width After User Resizes

6 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Randall Nelson
Top achievements
Rank 1
Randall Nelson asked on 23 Mar 2009, 10:52 PM
I would like to add a "Save Layout" feature to a grid.  I'd like to remember things like sorting, grouping, column locations, etc.  One thing I am having a problem with is the size of the columns.  If a user changes the width of a column, the Width property of the column does not show any change.  Is there a way to determine the width of a column after the user resizes it?

6 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 24 Mar 2009, 04:12 PM
Hi Randall,

We have a property of the column called PixelWidth. Unfortunately it is marked as internal. I ' will personally take care to make it accessible for use (public). The fix is going to appear in our service pack release which I believe will be in two weeks.

Please let me know if the lack of that feature blocks your development and waiting for the service pack is not acceptable. In such case I may try to arrange a custom build for you.

Sincerely yours,
Pavel Pavlov
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Randall Nelson
Top achievements
Rank 1
answered on 24 Mar 2009, 04:29 PM
Thanks for your response.  Our project can wait for your service pack.
0
Randall Nelson
Top achievements
Rank 1
answered on 14 Apr 2009, 09:58 PM
I have applied the 4/13 service pack and do not see the PixelWidth property on GridViewDataColumn - also the width property still does not seem to report the resized width. 
0
Pavel Pavlov
Telerik team
answered on 15 Apr 2009, 08:23 AM
Hello Randall ,

Please excuse me for the inconvenience caused . We found that our PixelWidht API was not consistent with the Microsoft naming and behaviour and needed few more touches.That is why we decided not to include this in the SP release. I am working on that issue right now  and will send you either a workarround or a custom build later today or tomorrow.   I am leaving the ticket open until we have the right solution for you.

Sincerely yours,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Pavel Pavlov
Telerik team
answered on 16 Apr 2009, 01:01 PM
Hello again Randall, 

I have prepared a custom build for you. It will provide an "ActulaWidth" public property for the column of type double. I believe this will fit your scenario.  Can you please open a support ticket so I can send the updated dlls to you.


Best wishes,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Randall Nelson
Top achievements
Rank 1
answered on 17 Apr 2009, 02:30 AM
Thanks very much!  I have create a support ticket.
Tags
GridView
Asked by
Randall Nelson
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Randall Nelson
Top achievements
Rank 1
Share this question
or