NewRowPosition Bottom Height

4 posts, 0 answers
  1. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 05 Jul 2014 Link to this post

    Hi,

    When NewRowPosition="Bottom" the grid does not allocate itself enough space to see the new row button, so you have to add MinHeight=60 for example.  Any reason for this?
  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 07 Jul 2014 Link to this post

    Hello Scott,

    I've tried to reproduce the problem you report but to no avail. I have prepared a sample project that you can find attached. Could you check it and let me know how it works on your side?

    Regards,
    Yoan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 11 Jul 2014 Link to this post

    Hi,  I've modified your solution to highlight the difference between newrowposition top and bottom.  I can't attach a zip but here is the new xaml:

    <UserControl x:Class="_836563_RadGridView_SL5_NoXAML_9.MainPage"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:my="clr-namespace:_836563_RadGridView_SL5_NoXAML_9"
                 mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="700">
        <UserControl.Resources>
            <my:MyViewModel x:Key="MyViewModel"/>
        </UserControl.Resources>
        <Grid x:Name="LayoutRoot"
              Background="White"
              DataContext="{StaticResource MyViewModel}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <telerik:RadExpander Header="Bottom" Grid.Row="0" IsExpanded="True">
            <telerik:RadGridView
                                 Name="clubsGrid"
                                
                                 AutoGenerateColumns="False"
                                 GroupRenderMode="Flat"
                                 NewRowPosition="Bottom"
                                 Margin="5">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
                                                Header="Est."
                                                DataFormatString="{}{0:yyyy}"/>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
                                                Header="Stadium"
                                                DataFormatString="{}{0:N0}"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
            </telerik:RadExpander>

            <telerik:RadExpander Header="Top" Grid.Row="1" IsExpanded="True">
                <telerik:RadGridView
                                
                                 AutoGenerateColumns="False"
                                 GroupRenderMode="Flat"
                                 NewRowPosition="Top"
                                 Margin="5">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
                                                Header="Est."
                                                DataFormatString="{}{0:yyyy}"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
                                                Header="Stadium"
                                                DataFormatString="{}{0:N0}"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </telerik:RadExpander>

            <StackPanel Grid.Row="2" Orientation="Horizontal">
                <Button Name="Button1"
                    Content="Set GridView's ItemsSource"
                    Click="Button1_Click"
                    Margin="5"
                    HorizontalAlignment="Left"/>
                <Button Name="Button2"
                    Content="Do Something 2"
                    Click="Button2_Click"
                    Margin="5"
                    HorizontalAlignment="Left"/>
            </StackPanel>
        </Grid>
    </UserControl>
  5. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 14 Jul 2014 Link to this post

    Hello Scott,

    As it turns out there is a problem with NewRowPosition="Bottom" when RadGridView is placed in a container measuring its children with infinity (as in your case - RadExpander). This is already logged in our bug tracking system as a bug report: GridViewNewRow is not displayed if NewRowPosition is set to Bottom,RadGridView is placed in a container measuring its children with infinity and there are no items. so you can track its status.



    Regards,
    Yoan
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top