Need a "New Row" row which is always visible

5 posts, 0 answers
  1. Mads
    Mads avatar
    25 posts
    Member since:
    Nov 2014

    Posted 22 Dec 2014 Link to this post

    I have a radgrid with sometimes 1000+ items, I want to be able to add new items like http://docs.telerik.com/devtools/wpf/controls/radgridview/managing-data/images/RadGridView_AddingNewItems_1.png but if possible, I would like "new" row to always be visible even though I am scrolling up and down

    Also I am not writing anything in my codebehind so if possible it should be pure xaml/commands

    Also not sure why CanUserInsertRows="True" do not show anything in the UI

    <radBusyIndicator:DmsRadBusyIndicator
        IsBusy="{Binding Path=WaterBucketIsBusy}"
        BusyContent="{Binding Path=WaterBucketIsBusyMessage}"
        Grid.Column="0"
        Grid.Row="0"
        Margin="9">
        <telerik:RadGridView
            AutoGenerateColumns="False"
            CanUserInsertRows="True"
            
            ItemsSource="{Binding Path=WaterBuckets}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding Path=Id}"
                    IsReadOnly="True"
                    Header="{x:Static localization:WaterBucketTexts.Bucket}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate DataType="dom:PBucketModel">
                            <TextBlock
                                Text="{Binding Path=Id}" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding Path=BullId}"
                    IsReadOnly="True"
                    Header="{x:Static localization:WaterBucketTexts.BullId}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate DataType="dom:PBucketModel">
                            <TextBlock
                                Text="{Binding Path=BullId}" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding Path=WaterType}"
                    IsReadOnly="True"
                    Header="{x:Static localization:WaterBucketTexts.WaterType}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate DataType="dom:PBucketModel">
                            <TextBlock
                                Text="{Binding Path=WaterType.WaterName}" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding Path=Spent}"
                    IsReadOnly="True"
                    Header="{x:Static localization:WaterBucketTexts.Spent}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate DataType="dom:PBucketModel">
                            <TextBlock
                                Text="{Binding Path=Spent}" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding Path=Delivered}"
                    IsReadOnly="True"
                    Header="{x:Static localization:WaterBucketTexts.Delivered}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate DataType="dom:PBucketModel">
                            <TextBlock
                                Text="{Binding Path=Delivered}" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
  2. Mads
    Mads avatar
    25 posts
    Member since:
    Nov 2014

    Posted 22 Dec 2014 in reply to Mads Link to this post

    Needed NewRowPosition="Bottom" for the row to show, cant enter anthing in the rows though
  3. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Dec 2014 Link to this post

    Hi,

    You need to
    set NewRowPosition="Bottom"  as explained in our online documentation. Please note that this mode is supported only when GroupRenderMode is Flat.  As an example, you can refer to this online demo. The same demo is available with our WPF Demos.

    I hope this helps.

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. Mads
    Mads avatar
    25 posts
    Member since:
    Nov 2014

    Posted 22 Dec 2014 in reply to Dimitrina Link to this post

    yes I found that part, now I only need the main thing which is to always show the "insert new row" even though Iam scrolled all the way to the bottem or top of the list
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 23 Dec 2014 Link to this post

    Hello,

    I am afraid there is not an option to configure so that the new row position to be frozen. It is placed inside the ScrollViewer in the template of RadGridView and that is why it moves on scrolling it.

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top