Hi ALL,
I would like to limit my user selection to only one row in the GridView at a time, instead of the default multi-select. Is there any way to set this to only one row selection at a time?
Hi,
I didn't do anything to enable multiple row selection, but I was given code to check and see which rows were selected. The key lies in the fact that I added a checkbox field to the columns.
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox chk1 = (CheckBox) row.FindControl("chk1");
if (chk1.Checked == true)
{
//code goes here
}
}
So this has nothing to do with multiple rows of the grid being selected, which is what I expected. What functionality do you want? Are you looking only to allow the user to be able to select one checkbox for the whole grid?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.