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

[Solved] make the grid occupy the 100% of the container

3 Answers 169 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.
Rajeev Unni
Top achievements
Rank 1
Rajeev Unni asked on 27 Oct 2009, 09:54 AM
hi team,

please see the attached screen shot, i need to make the grid to occupy the 100% width of reciding container.
below is the xaml I am using here.

 <telerikGrid:RadGridView x:Name="xdgControls"                                       Height="Auto"    Width="Auto"      MinHeight="200"   ItemsSource="{Binding ControlAssertionCol}" 
                                                 ScrollViewer.VerticalScrollBarVisibility"Disabled"    
                                                 ScrollViewer.HorizontalScrollBarVisibility="Disabled"   
                                      AutoGenerateColumns="False" Background="White"   
                                                  
                    ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" HorizontalContentAlignment="Stretch">  
                            <telerikGrid:RadGridView.Columns> 
                                <telerikGrid:GridViewDataColumn x:Name="x" HeaderTextAlignment="Center"    Width="Auto" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="y"  HeaderTextAlignment="Center"   Width="Auto" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="m" HeaderTextAlignment="Center"  Width="100" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="a" HeaderTextAlignment="Center"  UniqueName="o"  Width="100" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="i" HeaderTextAlignment="Center"    Width="100" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="t" HeaderTextAlignment="Center"   Width="100" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="w" HeaderTextAlignment="Center"  Width="100" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn x:Name="a" HeaderTextAlignment="Center"     Width="100" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                <telerikGrid:GridViewDataColumn HeaderTextAlignment="Center" Width="*" IsReadOnly="True" ></telerikGrid:GridViewDataColumn> 
                                  
                            </telerikGrid:RadGridView.Columns> 
                        </telerikGrid:RadGridView> 



3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 Oct 2009, 09:56 AM
Hi,

Can you provide a bit more info about your grid version? Generally you do not have to set Width and/or Height - RadGridView will do this be default!

Kind regards,
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
Rajeev Unni
Top achievements
Rank 1
answered on 27 Oct 2009, 10:08 AM
Hello Vlad,

here is the gridview  version 2009.2.812.1030.
I need to stretch the grid toward the end to fit 100% inside the container,

-rajeev
0
Vlad
Telerik team
answered on 27 Oct 2009, 11:26 AM
Hello Rajeev,

As I said in my previous reply the grid will occupy all available space by default - you do not have to set anything. Can you try your scenario with standard Silverlight DataGrid and let us know if our grid behaves differently?

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.
Tags
GridView
Asked by
Rajeev Unni
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Rajeev Unni
Top achievements
Rank 1
Share this question
or