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

2 Grids with same column width

2 Answers 174 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 22 Jan 2013, 12:43 PM
Hi,

i have a view with two RadGridView, in both the Columns are autogenerated.
In the second one the property ShowColumnHeaders is set to false, so you don't see that there are two grids.
In the view you see a GridView, a black line and then the next GridView.

            <telerik:RadGridView x:Name="TodoGrid"
                                 Grid.Row="0"
                                 Width="auto"
                                 Height="auto"
                                 AutoGenerateColumns="True"
                                 CanUserDeleteRows="False"
                                 CanUserFreezeColumns="False"
                                 CanUserInsertRows="False"
                                 CanUserResizeColumns="True"
                                 ColumnWidth="*"
                                 IsReadOnly="True"
                                 SelectionUnit="Cell"
                                 ItemsSource="{Binding ToDoRows}"
                                 RowIndicatorVisibility="Collapsed"
                                 ScrollViewer.VerticalScrollBarVisibility="Visible"
                                 ShowGroupPanel="False" />
 
.
.
.
.
 
            <telerik:RadGridView x:Name="DoneGrid"
                                 Grid.Row="2"
                                 Width="auto"
                                 Height="auto"
                                 AutoGenerateColumns="True"
                                 CanUserDeleteRows="False"
                                 CanUserFreezeColumns="False"
                                 CanUserInsertRows="False"
                                 CanUserResizeColumns="False"
                                 ColumnWidth="*"
                                 SelectionUnit="Cell"
                                 IsReadOnly="True"
                                 ItemsSource="{Binding DoneRows}"
                                 RowIndicatorVisibility="Collapsed"
                                 ScrollViewer.VerticalScrollBarVisibility="Visible"
                                 ShowColumnHeaders="False"
                                 ShowGroupPanel="False" />

The user can resize the columns in the top grid and i want now that the columns on the bottom grid resize in the same way like the top ones. I try to handle this about the ResizingEvent but don't find a working solution.

Can somebody please support me by this issue.

2 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 23 Jan 2013, 12:29 PM
Hello Mark,

In order to achieve your goal, I would suggest you to check the attached solution in this forum thread. You could use a similar approach in your scenario.


I hope this helps.

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mark
Top achievements
Rank 1
answered on 24 Jan 2013, 09:11 AM
Thank you for your reply.

There are two problems, i want it for all my columns and my columns are auto generated.
So i cant use the way about a property in my ViewModel because i do not know the number of columns.
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Mark
Top achievements
Rank 1
Share this question
or