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

[Solved] Unable to delete from grid item collection

2 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bhushan
Top achievements
Rank 1
Bhushan asked on 18 Jun 2009, 09:49 AM
Hi

I am using cleint delte column in my grid.
<telerik:GridClientDeleteColumn  CommandName="Delete"  ImageUrl="../../Resources/Images/Common/icon_delete.gif"   ButtonType="ImageButton" ConfirmText="Are you sure you want to delete?"/>

It delets the row. But in next postback. I found these rows in grid.Items collection. I also want to remove deleted from item collection.

How can i do this.

Thanks in advance.
B.Sethi

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Jun 2009, 10:47 AM
Hello B.Sethi,

The GridClientDeleteColumn is used for client side deletion which does not persist on postbacks. For your requirement, you can either perform an Automatic Delete operation or a manual delete operation with queries. Check out the following help documents which should help you achieve delete items from the database:
Deleting records
Insert/Update/Delete at database level with queries

Thanks
Princy.
0
Bhushan
Top achievements
Rank 1
answered on 18 Jun 2009, 11:46 AM
Hi thanks for quick reply.
Actully i don't want to update that deletion in DB because i want to delete the records on submission of page.
Another problem is that i can't provide the data second time on postback when deleting a record.
It means i can't provide the data in RadGrid1_NeedDataSource.

I have the data only when i am filling the grid first time.

For eg  first time i provided the 3 records to grid. Now these three records will not avalible again to provide in NeedDataSource. Now  i delete 1 record from grid. When i save i should get only 2 records.
Tags
Grid
Asked by
Bhushan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Bhushan
Top achievements
Rank 1
Share this question
or