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

[Solved] Column width Fill

5 Answers 276 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.
Cheng Lim Sek
Top achievements
Rank 1
Cheng Lim Sek asked on 07 Dec 2009, 02:12 PM
Hi,

In Q3, we are advise to use ColumnWidth instead of ColumnsWidthMode.
But in ColumnWidth, we can't set something like ColumnsWidthMode.Fill.
I need the features that the columns will fill the gridview and when i resize one of the column to become smaller, the gridview width is still 100%.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Dec 2009, 02:21 PM
Hello,

You can set ColumnWidth="*" to achieve your goal.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Cheng Lim Sek
Top achievements
Rank 1
answered on 07 Dec 2009, 05:32 PM
if i create a dynamic grid view in code behind.
am i need to apply this RadGridView.ColumnWidth="*"; to achieve same feature like ColumnsWidthMode.Fill?

thank you
0
Vlad
Telerik team
answered on 08 Dec 2009, 06:39 AM
Hello

Here is an example how to set the same programmatically:

RadGridView1.ColumnWidth = new GridViewLength(1, GridViewLengthUnitType.Star);


Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Cheng Lim Sek
Top achievements
Rank 1
answered on 08 Dec 2009, 08:04 AM
Hi, thanks for your reply.

i did set this in code behind:
RadGridView1.ColumnWidth = new GridViewLength(1, GridViewLengthUnitType.Star);

However this is not working consistent. sometime this is working, but sometime is not.

FYI, this programatic grid view will create in the tab control. And this tab control is inside the row detail.

Kindly provide me some advice on this.

thank you.
0
Vlad
Telerik team
answered on 11 Dec 2009, 07:58 AM
Hi,

 Please try our latest service pack (Q3 SP1) and if you still have such problems please open support ticket with small example demonstrating your scenario.


Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Cheng Lim Sek
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Cheng Lim Sek
Top achievements
Rank 1
Share this question
or