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

Inserting items with save all

2 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 10 Nov 2011, 12:29 AM
I have a grid where all items are set to edit mode, when I insert a new item, I want to be able to save that row, as well as other edited rows from  a "Save" command item - but the GridDataInsertItem doesn't seem to be part of the collection of GridItems in the call.

How can I access the inserted item when doing a "Save All?"

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 10 Nov 2011, 05:58 AM
Hello,

You can access inserting and editing items by below code.

GridEditableItem insertitem = RadGrid1.MasterTableView.GetInsertItem();
       // access inserted item here
 
       foreach (GridEditableItem edititem in RadGrid1.EditItems)
       {
           // access edited item here
       }

Let me know if i am not understand your requirement.

Thanks,
Jayesh Goyani
0
Daniel
Top achievements
Rank 1
answered on 10 Nov 2011, 04:47 PM
That looks like exactly what I was looking for - I couldn't find a reference to getting inserted items anywhere online, I'll give it a try.

Thanks!

Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Share this question
or