How to get visible rowindex of aspxgridview on row deleting event
12,234
Solution 1
use ASPxGridView.FindVisibleIndexByKeyValue Method at ASPxGridView.RowDeleting Event.. First Specify KeyFieldName in gridcontrol properties.
protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
int i = ASPxGridView1.FindVisibleIndexByKeyValue(e.Keys[ASPxGridView1.KeyFieldName]);
}
Solution 2
Handle the ASPxGridView.RowDeleting event;
Determine the processed row's key via the e.Keys[ASPxGridView.KeyFieldName] dictionary;
Determine the row's visible index via the ASPxGridView.FindVisibleIndexByKeyValue method.
Solution 3
You can also use variable e from the rowdeleting event like this
e.visibleIndex
Example:
With aspxgrid.getDataRow(e.visibleindex)
'Here you can use your code
End With
Author by
Sheik Syed Mohaideen
Updated on June 13, 2022Comments
-
Sheik Syed Mohaideen almost 2 years
Can anybody help me to get the visible
RowIndex
of the row onRowDeleting
event ofASPxGridView
control?