This is a migrated thread and some comments may be shown as answers.

Insert & delete when checked

1 Answer 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 15 Nov 2010, 04:44 AM
hi

I have a checkbox implemented in the radgrid. I have also created 2 objects for insert and delete and both of these objects takes in a parameter productid for insertion and delete.

I want to insert when a product is checked and delete when a product is unchecked. i am stuck here. Thanks

Protected

 

Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)

 

 

Dim item As GridDataItem = DirectCast(TryCast(sender, CheckBox).NamingContainer, GridDataItem)

 

item(

"ProductID").Text

 

 

End Sub

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Nov 2010, 12:29 PM
Hello,

I am not quite sure about your actual requirement when selecting the CheckBox. If you want to fire the delete command when unchecking the Checkbox,  you can use FireCommandEvent method as described in the following documentation.
How to fire command events from code

Could you provide some more information about your scenario if it doesn't help?

-Shinu.
Tags
Grid
Asked by
L
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or