Click here to Skip to main content
15,904,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to clear all check box in DataGrid on reset buton in vb.net

i hav try following code but unable to do..

VB
For Each row In myDg.Items
            Dim checkBox__1 As CheckBox = DirectCast(row.FindControl("chkBox"), CheckBox)
            CheckBox.Checked = False
        Next
Posted
Updated 15-Apr-13 22:12pm
v2

1 solution

VB
For Each row In myDg.Items
            Dim checkBox__1 As CheckBox = DirectCast(row.FindControl("chkBox"), CheckBox)
            checkBox__1.Checked = False
        Next



you missed to pick the veriable.
 
Share this answer
 
Comments
ammarkataa 16-Apr-13 4:50am    
Its givin compilation error on 1St line

For Each row In myDg.Items
PrashantSonewane 16-Apr-13 5:40am    
what is the error?

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