RadPropertyGrid Data Fields not resizing after Strech

6 posts, 1 answers
  1. Basit
    Basit avatar
    3 posts
    Member since:
    Mar 2017

    Posted 24 Mar Link to this post

    Hi!

    PropertyGrid User Control:

    01.<telerik:RadPropertyGrid x:Name="PropertyGrid1"
    02.                              
    03.            IsGrouped="True"
    04.            RenderMode="Hierarchical"
    05.            DescriptionPanelVisibility="Visible"
    06.            SortAndGroupButtonsVisibility="Visible"
    07.            LabelColumnWidth="80"
    08.                              
    09.            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
    10.            ScrollViewer.VerticalScrollBarVisibility="Disabled">
    11.    <telerik:RadPropertyGrid.PropertyDefinitions>
    12.        <telerik:PropertyDefinition Binding="{Binding Salary}" Description="Displays the Width property of the RadButton" DisplayName="Width">
    13.            <telerik:PropertyDefinition.EditorTemplate>
    14.                <DataTemplate>
    15.                    <telerik:RadNumericUpDown Value="{Binding Salary, Mode=TwoWay}" />
    16.                </DataTemplate>
    17.            </telerik:PropertyDefinition.EditorTemplate>
    18.        </telerik:PropertyDefinition>
    19.        <telerik:PropertyDefinition Binding="{Binding IsMarried}" Description="Displays the Height property of the RadButton" DisplayName="Married Count">
    20.            <telerik:PropertyDefinition.EditorTemplate>
    21.                <DataTemplate>
    22.                    <telerik:RadSlider Value="{Binding IsMarried, Mode=TwoWay}" />
    23.                </DataTemplate>
    24.            </telerik:PropertyDefinition.EditorTemplate>
    25.        </telerik:PropertyDefinition>
    26.    </telerik:RadPropertyGrid.PropertyDefinitions>
    27.</telerik:RadPropertyGrid>

     

    Code Behind

    01.public PropGrid()
    02.{
    03.    InitializeComponent();
    04.    this.PropertyGrid1.Item = new Employee()
    05.    {
    06.        FirstName = "Sarah",
    07.        LastName = "Blake",
    08.        Occupation = "Supplied Manager",
    09.        StartingDate = new DateTime(2005, 04, 12),
    10.        IsMarried = 4,
    11.        Salary = 3500,
    12.    };
    13.}

     

    Start application and expand the whole window. Resize it back, propertyGrid doesnt adjust.

    The root cause is the slider. If i remove the slider, everything works fine. For your reference, please see the attached project

    Is this a bug?

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    498 posts

    Posted 29 Mar Link to this post

    Hi Basit,

    Please try setting the Minimum and Maximum values of the RadSlider, for example:

    <telerik:RadSlider Value="{Binding Salary, Mode=TwoWay}" Minimum="1" Maximum="5000" />

    This seems to fix the issue when resizing the control.

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Basit
    Basit avatar
    3 posts
    Member since:
    Mar 2017

    Posted 29 Mar in reply to Stefan Nenchev Link to this post

    No it doesn't. 

    When you start the application, drag the slider to the maximum possible value. 

    Now resize the window. Issue still remains.

  4. Answer
    Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    498 posts

    Posted 03 Apr Link to this post

    Hello,

    Indeed, the issue can be reproduced when you use the maximum value of the RadSlider. We will further investigate the behavior from our side. As a workaround, would it be convenient for you to set a fixed width of the RadSlider?

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  5. Basit
    Basit avatar
    3 posts
    Member since:
    Mar 2017

    Posted 03 Apr Link to this post

    Hi!

    Well, I have dropped the use of RadSliders completely. Please keep us updated of the fix or updates.

     

    Thank-you.

  6. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    498 posts

    Posted 06 Apr Link to this post

    Hi,

    The issue is logged in our internal system and you can follow its progress on the following link from our Ideas & Feedback portal - RadSlider: Desired width does not lower according to the available width when Slider's maximum value is reached. You can click on "Follow this item" in order to receive notifications for future updates. 

    Though you have decided not to use the RadSlider functionality, as a workaround you can use the default Slider control as it seems to work as expected in such scenario.

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top