I am using wpf 4.0 and telerik (3rd party tool) in my application and in which using grid of telerik.Now in my application there is a requirement that if the screen resolution gets bigger than 1024*768 then the columns width should increase.So i gave column width as star (*).
But in case of more than 20 columns in one grid................all the columns get collapsed with each other and though I have done the ScrollBar visibility as auto...............I dont see the scroll bar.So kindly tell me what should be the correct way to define width for the column.
5 Answers, 1 is accepted
0

Ramesh
Top achievements
Rank 1
answered on 14 Jul 2011, 06:41 AM
Hi,
Keep ColumnWidth property as Star for gridview, and also set the width property to "Auto" for each column. So that you can view the scrollbar horizontally.
I hope this will resolve your issue.
Keep ColumnWidth property as Star for gridview, and also set the width property to "Auto" for each column. So that you can view the scrollbar horizontally.
I hope this will resolve your issue.
0

Parul
Top achievements
Rank 1
answered on 14 Jul 2011, 11:03 AM
Hello Ramesh,
Thanks for the reply.
I tried the way you described below but in case when length of data is too long.................the grid is exapnding till the data ends in case of clumn width ="auto" . Also I need the xl (microsoft excel) kinda behaviour in my grid , ie; no text wrap and user can expand and collapse the grid to see the data..................but atleast the grid should look proper such that if I have only 2 digit data in the grid...........its width should be shorter than others having bit long data.
Thanks for the reply.
I tried the way you described below but in case when length of data is too long.................the grid is exapnding till the data ends in case of clumn width ="auto" . Also I need the xl (microsoft excel) kinda behaviour in my grid , ie; no text wrap and user can expand and collapse the grid to see the data..................but atleast the grid should look proper such that if I have only 2 digit data in the grid...........its width should be shorter than others having bit long data.
0

Ramesh
Top achievements
Rank 1
answered on 14 Jul 2011, 11:36 AM
Hi Parul,
I did not get exactly what you are required like XL.
But each grid Column is having Width property as either
SizeToHeader,
Auto,
Pixel,
Star, or
SizeToCells.
Try with either of the above values set to width property of column and set the columnswidth property of gridview as star.
Hope this will help you
Regards
Ramesh
I did not get exactly what you are required like XL.
But each grid Column is having Width property as either
SizeToHeader,
Auto,
Pixel,
Star, or
SizeToCells.
Try with either of the above values set to width property of column and set the columnswidth property of gridview as star.
Hope this will help you
Regards
Ramesh
0

Parul
Top achievements
Rank 1
answered on 14 Jul 2011, 07:39 PM
HI Ramesh,
Thanks for the solution !!!!
Thanks for the solution !!!!
Width
="SizeToHeader"
worked for me :).
0

Ramesh
Top achievements
Rank 1
answered on 15 Jul 2011, 06:33 AM
Hi Parul,
It would be great help for me if some body can help on this issue. Telerik people are not responding for this issue. I thought this is the bug in radgridview.
Plz see this link
http://www.telerik.com/community/forums/wpf/gridview/gridview-columns-are-collapsing-while-loading-for-few-seconds.aspx#1720101
Regards
Ramesh
It would be great help for me if some body can help on this issue. Telerik people are not responding for this issue. I thought this is the bug in radgridview.
Plz see this link
http://www.telerik.com/community/forums/wpf/gridview/gridview-columns-are-collapsing-while-loading-for-few-seconds.aspx#1720101
Regards
Ramesh