How can I find the control in the row command of grid view?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
If u want to find a control in row command Use
For example if u want to find a lable with Id lbl then use..
If you are using usercontrols in your gridview itemtemplate then
((Control)e.CommandSource).NamingContainer
might not return your gridviewrow.In that case I used the following code for getting the current row:
It's not pretty, but it works.