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

Trying to resize column of RadGridView inside RadPane

2 Answers 49 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 1
Jacques asked on 18 Oct 2011, 05:05 PM
Hello,
I have a RadGridView in a RadPane.
As the RadPane is resized, I wish to adjust the width of a column in the RadGridView.
Is there a way to do that? I understand that the SizeChanged event is not the solution.

2 Answers, 1 is accepted

Sort by
0
Jacques
Top achievements
Rank 1
answered on 19 Oct 2011, 10:37 AM
Hello,
Is there a mean for the Pane content to be aware of the RadPane size?
How is it possible to achieve the effect shown in the attached image?
0
Yana
Telerik team
answered on 25 Oct 2011, 11:33 AM
Hello Jacques,

Please try it like this:

<telerik:RadPane Header="Pane 1" Name="pane1">
    <Grid x:Name="pane1Grid" VerticalAlignment="Stretch"
            HorizontalAlignment="Stretch"
            Background="Aqua"
            SizeChanged="pane1Grid_SizeChanged" >
        <StackPanel>
            <TextBlock Text="Width: " />
            <TextBlock x:Name="paneWidth"  />
            <TextBlock Text="Height: " />
            <TextBlock x:Name="paneHeight" />
        </StackPanel>
    </Grid>
</telerik:RadPane>

and the event handler:

private void pane1Grid_SizeChanged(object sender, SizeChangedEventArgs e)
{
    paneWidth.Text = e.NewSize.Width.ToString();
    paneHeight.Text = e.NewSize.Height.ToString();
}

Hope this helps.

Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
Jacques
Top achievements
Rank 1
Answers by
Jacques
Top achievements
Rank 1
Yana
Telerik team
Share this question
or