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

Delete & Insert button

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jessica
Top achievements
Rank 1
Jessica asked on 02 Aug 2010, 01:56 PM
Hi,
I am trying to make an application that on the delete button will first insert that selected row into a new table and after it was inserted, then delete it from the previous table.

I am having difficulties, any suggestions?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 05 Aug 2010, 09:51 AM
Hi Jessica,

Here are the steps for implementing your scenario:

1. You need a GridButtonColumn for the first grid.
2. In the mark-up for that, set the CommandName property to "Delete".
3. Attach a server-side event handler to the first grid's DeleteCommand event.
4. In the server-side handler, delete the row from the underlying data-source of the first grid (most probably you are using a database, so you have to delete it from there).
5. Insert the row into the data source of the second grid.
6. Rebind only the second grid: RadGrid2.Rebind().

Do take a look at our online examples on insert/update/delete operations in RadGrid and the following help topic:
http://www.telerik.com/help/aspnet-ajax/grdinsertupdatedeleteatdatabaselevel.html

Hope it helps.

Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jessica
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or