check values of radio button in grid view before updating database

cmis

New member
Joined
Jun 9, 2011
Messages
1
Programming Experience
1-3
Hi All


I am working on a grid view where I have an acitve column which has radio button, user can select either yes or no for the active column. depending on the selection I am able to update the database.

I am using the code below to get the selected value of the row in the grid view

For i = 0 To Request.Form.Count - 1
Name = Request.Form.AllKeys(i)
If (Name.StartsWith("list")) Then
Value = Request.Form.GetValues(i)(0)
Array = itemName.Split("_")
Name = itemArray(1)


Now I want to check the grid view if atleast one row has active field set to "yes", If user selects all the rows to No I want to display an error instead of updating the database.

how can we check the entire grid view if atleast one row has active = yes


Thanks in advance
 
Back
Top