Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to find the cell value of a gridview using row index in checkbox changed event

1 solution

Yes, you can find cell value in checkbox changed event using row index or the row itself.
Check following-

CheckBox cb = (CheckBox)sender;
GridViewRow gr = (GridViewRow)cb.Parent.Parent;
string cellvalue=string.Empty;

//if you have BoundFields
cellvalue = gr.Cells[0].Text;//replace with the required cell index

//if you have Label
Label lbl=(Label)gr.FindControl("YourLableId");

Hope, it helps :)
Share this answer
Member 11332148 6-Jan-15 4:59am    
how to find label value of a grid view?
Suvendu Shekhar Giri 6-Jan-15 5:27am    
Check the updated answer :)
If you need further help, please let me know.
If it helped resolving your problem, please make sure to mark this as answer :)
Member 11332148 6-Jan-15 5:55am    
Thnk u :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900