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

Add New Row in Grid

1 Answer 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
sudeep
Top achievements
Rank 1
sudeep asked on 06 Feb 2011, 11:58 AM
Hi,
I need to add new row in a grid at the time of edit last row in the grid.
Thanks,
Sudeep

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 Feb 2011, 08:22 AM
Hi sudeep,

You may handle the RowEditEnded event and once the index of the currently edited item is equal to the last one, you may call the BeginInsert() method:

void playersGrid_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
        {
            if(this.playersGrid.Items.IndexOf(e.Row.Item)==this.playersGrid.Items.Count-1)
            {
                this.playersGrid.BeginInsert();
            }
        }
 

Kind regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
sudeep
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or