dataview problem after clear()

  • Thread starter Thread starter toufik
  • Start date Start date
T

toufik

Hi,
In my winform, I bind the controls to a dataview DV1 that is created on a
datatable TABLE1,
The problem is the I loose the binding when I refill the datatable (CLEAR(),
dataadapter.fill(dataset1,"TABLE1")).

Any idea pllease
 
Toufik,

How do you do the clear exactly?

Because I don't know a command
Datatable(Clear()

And if you do it by
mydatatable = new datatable,

Than it is clear

Cor
 
exactly here is the process:
1- ONLOAD:
- create dataadapter DA1
- DA1.fill(DS1,"TABLE1")
- create dataview DV1 on table TABLE1
- bind the controls to the dataview DV1
(every thing works OK)

2- On ACTIVATE event (because I change the data in another form and I
re-load the information)
- create a new datadapter DA1 (which has the same structure but not the same
rows)
- DS1.tables("TABLE1").clear()
- DA1.fill(DS1,"TABLE1")

here I loose the binding, exactly because of the CLEAR thar I did for the
dataset.tables("TABLE1"), if I remove the clear the binding still here but I
don't have the information I need (the old information stay here)

Thanks for any help.
 

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