c# - How to get label control value from gridview templatefield -


i have gridview , sqldatasource.

i have templatefield column , below textbox of edit item template have simple label .

is there way of getting label value in row updating event?

i've tried : string llbl = ((label)row.cells[6].findcontrol("label1")).text; hmm think shouldnt cells[6] since want label .

thanks

i think looking for:

datarow row = ((datarowview)e.row.dataitem).row;  label mylabel = (label)e.row.findcontrol("lblname"); 

edit:

ok, try then:

gridviewrow row = mygrid.rows[e.rowindex]; label mylabel = (label)row.findcontrol("mylabel"); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -