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

RadGridView resize on form resize

4 Answers 288 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lina fetisova
Top achievements
Rank 1
lina fetisova asked on 08 Jun 2010, 06:18 AM
Good day!
I have such a xaml:

<Window x:Class="CAP.AdminTool.Questions"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Вопросы" Height="700" Width="750" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Icon="/CAP.AdminTool;component/favicon.ico" FontFamily="Verdana" FontSize="13" Loaded="Window_Loaded" >
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="60"></RowDefinition>
            <RowDefinition Height="auto" MinHeight="30"></RowDefinition>
            <RowDefinition Height="auto" MinHeight="60"></RowDefinition>
            <RowDefinition Height="auto" MinHeight="30"></RowDefinition>
        </Grid.RowDefinitions>
        <telerik:RadGridView Grid.Row="0"
             HorizontalAlignment="Left"
             Name="grQuestionSets"
             VerticalAlignment="Top"
             Height="auto"
             MinWidth="700"
             AutoGenerateColumns="False"
             SelectionChanged="grQuestionSets_SelectionChanged"  >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Раздел вопросов" UniqueName="Name" Width="auto" MinWidth="300"/>
                <telerik:GridViewDataColumn Header="Описание" UniqueName="Description" Width="auto" MinWidth="400"/>             
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>       
    </Grid>
</Window>


I want my RadGridView width to change when I change the width of the window.
How can I do it?

4 Answers, 1 is accepted

Sort by
0
lina fetisova
Top achievements
Rank 1
answered on 08 Jun 2010, 12:37 PM
oh, sorry
it was too simple - HorizontalAlignment="Stretch"
sorry for a stupid question
0
lina fetisova
Top achievements
Rank 1
answered on 08 Jun 2010, 12:44 PM
but how not to allow the third column to appear when GridView width grows?
0
Accepted
Kalin Milanov
Telerik team
answered on 10 Jun 2010, 09:23 AM
Hello Lina,

From the looks of it setting Width="*" on the second column should do the trick.
Let me know how this goes.

Best wishes,
Kalin Milanov
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
lina fetisova
Top achievements
Rank 1
answered on 22 Jun 2010, 09:12 AM
Thank you, it works!
Tags
GridView
Asked by
lina fetisova
Top achievements
Rank 1
Answers by
lina fetisova
Top achievements
Rank 1
Kalin Milanov
Telerik team
Share this question
or