How to get visible rowindex of aspxgridview on row deleting event

asp.netaspxgridviewdevexpress

Can anybody help me to get the visible RowIndex of the row on RowDeleting event of ASPxGridView control?

Best Answer

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]);            

 }
Related Topic