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

GridViewColumn Width behavior changed

4 Answers 243 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Luc
Top achievements
Rank 1
Luc asked on 23 Nov 2015, 10:36 AM

Hi,

 Since UI WPF Q3 2015, I notice change in the GridView column auto size. I have the following simple user control (with no height and width) :

 

<UserControl x:Class="WpfApplication1.UserControl1"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:WpfApplication1"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerik:RadGridView AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" Width="150"/>
                <telerik:GridViewDataColumn Header="Description" Width="*"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>

In my MainWindow I have a button which show a RadWindow with the UserControl content :

private void OnClick(object sender, RoutedEventArgs e)
{
    RadWindow window = new RadWindow();
    window.SizeToContent = true;
    window.Content = new UserControl1();
    window.SizeChanged += delegate
    {
        window.Header = string.Format("({0}, {1})", window.Height, window.Width);
    };
    window.ShowDialog();
}

In Telerik 2015.2.728.45, the RadWindow size is correct (like i expect in fact). In Telerik 2015.3.* the gridcolumn with Width="*" take all width possible (infinite?) and radwindow Width become infinite.

 

What's the correct behavior ? Telerik 2015.2 or 2015.3 ? Do I need to set the UserControl size ? (I prefer to avoid this solution like my real application is more complex and expect to have an UserControl resize from its content).

Thanks

Regards

Luc

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Nov 2015, 10:13 AM
Hi Luc,

I am investigating what the cause of this issue might be, however I need more time for this. I will contact you as soon as I have a result.

Thank you in advance for your patience.

Regards,
Stefan X1
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Luc
Top achievements
Rank 1
answered on 08 Dec 2015, 10:13 AM

Hi Stefan,

For your information, windows are width over-sized not only for GridView. I have the same behaviour with RadRichTextBox for sample.

Any clues ?

Regards

0
Accepted
Stefan
Telerik team
answered on 09 Dec 2015, 01:50 PM
Hi Luc,

Thank you for the additional information and please excuse me for the delayed reply.

After investigating the issue, it seems that there has been a malfunction of the SizeToContent property of RadWindow as of 2015.2. With 2015.3 version it has been fixed, so the expected behavior in a scenario as yours would be the control to take all width possible.

Best Regards,
Stefan X1
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Luc
Top achievements
Rank 1
answered on 09 Dec 2015, 01:59 PM

Hi Stefan,

 

Thank you for your answer, even if previous amlfunction was great for me :). I will set the size of window.

Regards

Tags
GridView
Asked by
Luc
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Luc
Top achievements
Rank 1
Share this question
or