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

Radgrid in editmode not keeping values

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rick Hewitt
Top achievements
Rank 2
Rick Hewitt asked on 20 Feb 2009, 05:13 PM

To all,
   This is basically a how to do question:  First my scenario:

With Radgrid:

     EditMode is set to InPlace

     All rows within the grid are set to edit = true through the Pre-Render event of the grid.
    All editable columns have a custom editor in the EditItemTemplate; RadCombos, raedNumerics and simple asp textboxes.
    Date is retrieved through a DAL object within the NeedDataSource event
    All editors retrieve their values through the ItemDataBound event of the grid
    I have a custom ItemCommand template setup with Linkbuttons to perform the insert,update,delete commands

Here is the challenge I am facing:

 

When the grid appears all of my items are in edit mode which is desirable

 

I make a change to one of the textboxes on the grid and then I press Add New record in the ItemCommand template.

I want the new row to appear and it does but what is happening is that I am losing all other edits in all other rows.

 

I tried the solution of e.cancel in ItemCommand event but that doesn't seem to work, not only did I lose my edits but I did not get my new row to appear.

So I need advice on the following:

1. How do I preserve all data changes within all of my rows by simply clicking the Add new record itemcommand template and still get my new row to appear in the grid?
2. How can I also click on the Add new record template and receive multiple new rows as of now I only see that working one time until the data has been saved?

Thanks to all,
Rick

   

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Feb 2009, 09:22 AM
Hi Rick,

Go through the online demo which shows how you can perform multiple Insert with RadGrid.
Insert in grid with tooltip

Shinu
Tags
Grid
Asked by
Rick Hewitt
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or