Hi friend
can any one help me to handle the checkbox event in the datagrid?
i m having problem regardig to handle the checkedchanged event of checkbox.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
nikshuklaPosted Nov 17, 2006, 1:51 PM
You need to do something as follows.
ItemCreated event of datagrid.
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim cbS As CheckBox
If Not e.Item.Cells(0).FindControl("chkSelected") Is Nothing Then
cbS = CType(e.Item.Cells(0).FindControl("chkSelected"), CheckBox)
AddHandler cbS.CheckedChanged, AddressOf checkBox_CheckedChanged
End If
cbS = nothing
End If
Private Sub checkBox_CheckedChanged()
End Sub