Get Template Field Label information in gridview selected index changed event.

Posted by Gopal_nivas under ASP.NET on 7/5/2011 | Points: 10 | Views : 7566 | Status : [Member] | Replies : 1

i want to get the details of a selected row values in grid selected index changed event.. i was using template field in order to bind row values.
now i used <asp:CommandField> in order to select the details of particular row.

if i select particular row command filed link button means it returns only empty value for template field cell values.

but i want to get particular row template filed cell vale.

how to do this..
need ur suggestions with example



Posted by: Lakn2 on: 7/5/2011 [Member] Starter | Points: 25

in gridview1_selectedindexchanged event first you get values like

lable lb=(label)(gridview1.rows[e.rowindex].findcontrol("label1");

now you can access into any control of label value using lb.text;

LakshmiNarayana Nalluri.

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response