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

Deleting event and GridViewDeletingEventArgs

2 Answers 17 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis Bouchard
Top achievements
Rank 1
Louis Bouchard asked on 21 May 2010, 04:46 PM
Hello,

How to get the value of a specific cell in the Deleting event?

Thank you

2 Answers, 1 is accepted

Sort by
0
Louis Bouchard
Top achievements
Rank 1
answered on 21 May 2010, 04:47 PM
p.s. : a cell of the line selected for deleting of course.
0
Milan
Telerik team
answered on 24 May 2010, 06:50 AM
Hi Louis Bouchard,

It is best to use the data items instead of UI elements. For example you can get access to the items that are being deleted and their properties instead of looking for UI elements that are bound to those properties.

void gridView_Deleted(object sender, GridViewDeletedEventArgs e)
{
    var itemToBeDeleted = e.Items[0] as MyDataType;
    var name = itemToBeDeleted.Name;
}


All the best,
Milan
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
GridView
Asked by
Louis Bouchard
Top achievements
Rank 1
Answers by
Louis Bouchard
Top achievements
Rank 1
Milan
Telerik team
Share this question
or