How to delete datarow from datatable according to the gridview's checkbox?
-
Hi all, In my case, i am getting the datatable(dt1) and then bind to gridview (gv1). And in the gv1 i am already add the TemplateField(checkbox) for each rows. My question is how can i delete the datarow according the checkbox(if checked) in the gv1 ? any helps are welcome. regards cocoonwls
-
Hi all, In my case, i am getting the datatable(dt1) and then bind to gridview (gv1). And in the gv1 i am already add the TemplateField(checkbox) for each rows. My question is how can i delete the datarow according the checkbox(if checked) in the gv1 ? any helps are welcome. regards cocoonwls
Assuming that you are actually using a DataGridView. Iterate over the
Rows
collection, and delete those that have theCheckBox
checked.Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Assuming that you are actually using a DataGridView. Iterate over the
Rows
collection, and delete those that have theCheckBox
checked.Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”