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

[Solved] Column Width Issue

2 Answers 82 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.
Chris
Top achievements
Rank 1
Chris asked on 09 Sep 2010, 04:30 PM
Hi,

I have a RadGridView and I'm handling the RowLoaded event in order to set the font weight of the cells in the row based on some data property of the row item.

The issue is when the font weight property of bold is applied to the cells, their contents can extend over the boundary line to the next cell if the column was already stretched to its maximum width. Any change to the column width manually using the mouse will then correctly hide the text that is extending out of the cells in question.

Can I force the columns in the GridView to resize after the RowLoaded events have finished firing and the size of the data in all cells is then known?

Regards,
Chris

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 13 Sep 2010, 08:43 AM
Hello Chris,

The proper way would be to use the RowStyleSelector property. Please check the online demo here and the help topic here.

You will have one style which sets the font to bold and the other which does not.

Hope this helps.

Kind regards,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 13 Sep 2010, 10:56 AM
The solution provided works perfectly. Many thanx.

Regards,
Chris
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Chris
Top achievements
Rank 1
Share this question
or