Filter the table and clear it

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

I got a Parent-Child two relationship tables,
Now ,Before ds.accetpchanges , my child table may got 4-5K records,
The user may only tick 3-4 records,
I only want to store that ticked record, How can I do that ?
My stupid way is loop each record and check whether there is tick or not.
if not, datarow.remove() .

It seems take a very long time to do .
Please help
 
How do they "tick the records"? What's the primary key? Do you have a
column indicating that the records are marked? I'm doing something similar
with a couple of ListViews and DataTables right now. If you could post some
more info, I might be able to post something to help you...
 
in my Datagrid, I had set one DataGridBoolColumn, and bind to the datatable.
if myDatatable.row("tick") = true then...
 
Thanks Cor,
Dim myDataRowArray() As DataRow = custDS.Tables(0).Select(Nothing, Nothing,
DataViewRowState.Added)
myDataAdapter.Update(myDataRowArray)
^^^^^^^^^ It seems work for me. I am trying now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top