DetailRowExpandedChanged method of a devExpress data grid view - ASP.NET

This post shows how to some c# developing at the DetailRowExpandedChanged method of a devExpress data grid view of ASP.NET.
Normally you can catch a data values which are shown in the view to the user. Then you can bind that data to
your Session and use the data wherever you want.
/////////////////////////////
protected void gridView_DetailRowExpandedChanged(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewDetailRowEventArgs e)
    {
Session["VisibleIndex"] = e.VisibleIndex;
// By above line you can catch the visible index of the row you are expanding
/*Also below line shows how to catch a column value of the row you gotta expand the details..*/
string name = Convert.ToString((sender as ASPxGridView).GetRowValues(e.VisibleIndex, "NAME")); /*Here NAME  = FieldName property of the gridview column*/
}

Comments

Popular Posts