Trying to resize column of RadGridView inside RadPane

3 posts, 0 answers
  1. Jacques
    Jacques avatar
    4 posts
    Member since:
    Sep 2011

    Posted 18 Oct 2011 Link to this post

    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. Jacques
    Jacques avatar
    4 posts
    Member since:
    Sep 2011

    Posted 19 Oct 2011 Link to this post

    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?
  3. DevCraft banner
  4. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 25 Oct 2011 Link to this post

    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 >>

Back to Top