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

[Solved] RadGrid:HeaderStyle-Width vs ItemStyle:Width

3 Answers 958 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brett Robichaud
Top achievements
Rank 1
Brett Robichaud asked on 07 Apr 2009, 09:13 PM
What is the difference between using the HeaderStyle-Width attribute of RadGrid vs the Width attribute of ItemStyle? I have experiemented with both and they do not always appear to be equivalent. Can anyone add any color to how these two work?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Apr 2009, 05:06 AM
Hi Brett,

HeaderItemStyle property controls the appearance of the header item in a Telerik RadGrid control where as ItemStyle represents the style of data items in a GridTableView control. But from my understanding to set the width of a column you need to set the HeaderStyle-width instead of ItemStyle-width.

Shinu
0
Brett Robichaud
Top achievements
Rank 1
answered on 08 Apr 2009, 02:07 PM
You have hit the nail on the head with regard to my question. In my experimentation it seems I need to use the HeaderStyle-width to set the width of a column. I was really looking for confirmation of this, which you have offered, but also some explanation as to why and just what ItemStye width is for? I blew a few hours playing with these two trying to narrow in on the correct approach.
0
Accepted
Dimo
Telerik team
answered on 09 Apr 2009, 05:41 AM
Hello,

In short, I am not aware of cases in which ItemStyle-Width should be used at all. This property exists only because ItemStyle inherits from TableItemStyle.

For column widths, please use HeaderStyle-Width only.

Best wishes,
Dimo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Brett Robichaud
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Brett Robichaud
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or