开发者

Best Practice for Telerik radGrid Grid and Column widths

I wanted to ask what is the best practice to manage width of the radGrid.

For my application most users are running 1280 x 1024 so I would be happy to set my overall grid width to 1100. However, depending on the form in use, I sometimes have horizantal scroll bars. To solve this, I have been playing with the width of the grid, and also I have played with setting the itemstyle-width for one or two columns. Sometimes I accidentally get it right, and sometimes it is not quite right.

What is the best way to manage this? Do I s开发者_运维知识库et the grid, and then all columns, or just the grid, or just the columns? I guess there is a best practice, so just wondering how you handle it,

thanks

PS. I have posted this on the Telerik forums, I know, of course, that it it not considered acceptable to paste the internet with the same post, but I do want to use stackoverflow, and hope that I am playing by the rules if I post directly on Telerik also.

Mark Breen Mark Breen Ireland BMW R80GS 1987


I set the width on the RadGrid to 99% in the definition, and then if I need to constrain the width, I set the Width explicitly on the RadGrid, or a parent HTML element. You may want to set a percentage instead of an explicit with as another option too. Do you need to adjust the size dependent on the resolution?

Setting the columns helps if you want a specific column of a specific width; as you probably know, table columns can change widths as determined by the browser, and setting the explicit width helps avoiding crunching data that you want to be of a specific width.

HTH.


I also set the width of the RadGrid to 99%, but the width of the MasterTableView to 100%.

Then I explicitly set the width of each column, so the same type of data is consistently shown on all my grids. (i.e.: All phone number columns are same width. All Date columns are same width, etc.)

Most of my grids show a lot of data, so I always use the horizontal scroll.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜