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

NewRowPosition Bottom Height

3 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott Waye
Top achievements
Rank 2
Veteran
Iron
Scott Waye asked on 05 Jul 2014, 07:22 PM
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?

3 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 07 Jul 2014, 09:03 AM
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.
 
0
Scott Waye
Top achievements
Rank 2
Veteran
Iron
answered on 11 Jul 2014, 03:34 PM
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>
0
Yoan
Telerik team
answered on 14 Jul 2014, 07:00 AM
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.
 
Tags
GridView
Asked by
Scott Waye
Top achievements
Rank 2
Veteran
Iron
Answers by
Yoan
Telerik team
Scott Waye
Top achievements
Rank 2
Veteran
Iron
Share this question
or