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

Delete rows from Database

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erin
Top achievements
Rank 1
Erin asked on 07 Jan 2014, 12:29 PM
Hi
please help im using GridClientDeleteColumn to delete my rows . It removes the row but not from database.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Jan 2014, 12:39 PM
Hi Erin,

GridClientDeleteColumn is designed to delete rows client-side and to persist these changes. Once you post your page to the server the grid will delete client deleted rows. If you want immediate delete with post-back you can use GridButtonColumn with CommandName = "Delete".
If you insist to use GridClientDeleteColumn you should handle DeleteCommand server-side as shown below:

C#:
protected void RadGrid1_DeleteCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
  //your code
}

Thanks,
Princy

Tags
Grid
Asked by
Erin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or