Friday 30 May 2014

Get Gridview RowIndex on RowDataBound and RowCommand gridview in asp.net

//*************** On RowCommand

 GridViewRow gvr = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
            int rnd = gvr.RowIndex;  //Row Index



//*************** On RowDataBound

int rnd= e.Row.RowIndex;   //Row Index

1 comment:

  1. showing error as object reference not set

    ReplyDelete

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...