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

column width to fill

5 Answers 260 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nick Wood
Top achievements
Rank 1
Nick Wood asked on 09 Jun 2010, 03:32 AM
hi All

I want 1 column to fill all available width on the screen (the rest are auto width). the issue is that if I set the column  Width="*" then the whole grid is way wider than the available screen space and it produces a horizontal scrollbar.

I am using the latest 2010 version.

I have seen that this issue was mentioned as a bug several times as far back as 2008. Is this still a bug in the current version?

5 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 09 Jun 2010, 06:29 AM

Hi Nick Wood,

Does the grid become a lot wider or just a pixel or two? If RadGridView becomes a lot wider it is probably measured with infinite width. What happens when you set a concrete width to the grid?


Greetings,
Milan
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
Nick Wood
Top achievements
Rank 1
answered on 09 Jun 2010, 07:36 AM
Actually, I just posted a support ticket about the gridview inside a panelbar. I think that the panelbar is the issue, however, I think that this is a bug as the panelbar is set to stretch in it parent, yet the gridview, which is a child of the panelbar, is forcing the panelbar to exceed it bounds.

There is an attached example project to the support ticket post that demonstrates the issue.
0
Valentin.Stoychev
Telerik team
answered on 10 Jun 2010, 09:35 AM
Hi Nick Wood,

We already replied to you in the forum thread. I'm pasting the same reply here just in case:
----
The way panelbar is designed will not allow you to host the gridview inside it. You need to set a Height for the PanelBarItem that is hosting the gridview control in order to limit the size.

We will change this behavior in the future and will make the panelbar items to be content controls, but for the moment this is your only option.
----

Sincerely yours,
Valentin.Stoychev
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
Adam
Top achievements
Rank 1
answered on 07 Jan 2011, 04:34 PM
Hi,

I am running into this exact issue.  I have a radgridview within a radpanelbaritem and I want to set one column such that it will fill the extra horizontal space.  Thus far I have not found a setting that allows this and have repeated the above user's results on setting the column width to *; the grid view becomes about five times as wide as the entire window.  So, now that hosting controls content is possible within a radpanelbaritem, how do I accomplish this?

Thanks
0
Tina Stancheva
Telerik team
answered on 12 Jan 2011, 05:42 PM
Hello Adam,

You will need to set the Width of the RadGridView accordingly to the Width of the RadPanelBar. If you don't want to set static values, you can bind the GridView Width property. I attached a sample project illustrating a possible approach towards your scenario. Please have a look at it and let me know if this is what you had in mind or if you need more info.

Best wishes,
Tina Stancheva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Nick Wood
Top achievements
Rank 1
Answers by
Milan
Telerik team
Nick Wood
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Adam
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or