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

Need a "New Row" row which is always visible

4 Answers 337 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mads
Top achievements
Rank 1
Mads asked on 22 Dec 2014, 12:08 PM
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>

4 Answers, 1 is accepted

Sort by
0
Mads
Top achievements
Rank 1
answered on 22 Dec 2014, 12:27 PM
Needed NewRowPosition="Bottom" for the row to show, cant enter anthing in the rows though
0
Dimitrina
Telerik team
answered on 22 Dec 2014, 03:45 PM
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.

 
0
Mads
Top achievements
Rank 1
answered on 22 Dec 2014, 08:01 PM
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
0
Dimitrina
Telerik team
answered on 23 Dec 2014, 10:53 AM
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.

 
Tags
GridView
Asked by
Mads
Top achievements
Rank 1
Answers by
Mads
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or