mike55 Posted July 17, 2007 Posted July 17, 2007 I have created a template field and inserting a checkbox into the field. I have name the checkbox as: "chkReceipient". I am trying to loop through the grid and check the checkbox in each row to determine if it is checked or not. If the checkbox is checked do something with that row, otherwise move on to the next row. Here is my code: For inti = 0 To GridView1.Rows.Count - 1 Dim rowCheckBox As CheckBox = GridView1.Rows(inti).FindControl("chkReceipient") If rowCheckBox.Checked = False Then dstMembers.Tables("dstMembers").Rows.Add(myRow) End If Next The problem that I am having is that the rowCheckBox.Checked is returning the value "False" in all cases evenwhen I check the checkbox. Any suggestions? Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
mike55 Posted July 17, 2007 Author Posted July 17, 2007 Problem solved, never placed the code that was called during the page load in an if not page.ispostback statement. Off to hang my head in shame... Mike55 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.