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

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...