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

[Solved] Columns width issue when adding rows

1 Answer 112 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.
Pablo
Top achievements
Rank 1
Pablo asked on 15 May 2009, 03:23 PM
Hello,

I am using the grid view to show a list of users, very simple. The grid is initially empty and its content is populated after the user selects one group from a combobox. The problem is that the first time the data is populated, when the vertical scrollbar appears, it covers part of the last column, making the horizontal scrollbar to appear. It should not happen because of the width properties of the columns (last column with "*"). After that, any update on the data source of the grid, makes the column change its width, as it should have happened on the first load, and hides the horizontal scrollbar.
 
The same happens in the opposite situation, passing from a lot of rows to a number of rows where the grid does not need the vertical scroll. If the grid does not need to show the vertical scrollbar, the last column does not get expanded until the next update on the ItemsSource, leaving some empty space at the end of the grid row.

It looks like the grid needs to be bound twice to apply the right layout; the first one to make the scrollbars appear or disappear; and the second one to change the columns width based on the available space (with or without the scrollbar)

With the content that I have it should be fully visible, the horizontal scrollbar should never appear, and the vertical scrollbar should not cover part of the last column.

I would also like to take the opportunity to ask if it is possible to always show the vertical scrollbar, so at least with the vertical scrollbar always visible, the horizontal scrollbar would not appear and my text would not be covered by the vertical scrollbar.

I am using RadControls_for_Silverlight_2009_1_0413_DEV release 

The xaml code that I am using is:

 

 

<telerikGridView:RadGridView x:Name="rgvUsersInGroup" IsFilteringAllowed="False"

 

 

IsReadOnly="True" AutoGenerateColumns="False" Height="400" Width="400" >

 

 

 

    <telerikGridView:RadGridView.Columns>

 

 

 

        <telerikGridView:GridViewDataColumn DataMemberPath="FullName" HeaderText="Name" Width="250">
        </
telerikGridView:GridViewDataColumn>

 

 

 

        <telerikGridView:GridViewDataColumn DataMemberPath="Login" HeaderText="Login" Width="*">
        </
telerikGridView:GridViewDataColumn>

 

 

 

    </telerikGridView:RadGridView.Columns>

 

 

 

</telerikGridView:RadGridView>

Thank you very much for your help,

Pablo

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Nedyalko Nikolov
Telerik team
answered on 18 May 2009, 12:43 PM
Hi Pablo,

It seems that you've a hit a bug in our control, so I've updated your Telerik points accordingly.
Good news is that issue is already fixed and will take part in the upcoming service pack.

P.S. Service pack will be available later this week.

Greetings,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Pablo
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or