Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
gridview one column link button having i am selecting third row but i need output third row

You can get values of selected row in following way,


Where Gridview1 -> Id of Gridview
index -> cell No.
Share this answer
you need to play with ItemCommand event of datagridview. as you click on the link button (as you said is in your first column) control will take you to that event where you would get the selected row inside CommandEventArg e.
just do as follows

bool val =  ((checkbox)e.item.findcontrol("yourCheckBoxName")).checked;

this way you would get the value of your check box.
Share this answer

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