Strange behaviour of Listview loaded from database

D

David

I have mentioned this issue previously but as yet have not found a solution.

In VB.Net 2003, I have 4 Listviews on a Tab.

Each listview has the data source property set to point to a database table
and the display member set to a field in that table.

The program runs fine and all the information appears in the listviews as
expected. If I deploy the application, the listviews still behave correctly.

But, when I close the IDE and reopen it, one particular listview keeps
clearing the data source property and I have to set it again. It only
happens with particular listview, the display member is intact but the data
source is cleared.

I am not sure if it is related but periodically 2 of the TABs on the TAB
control swap positions and I have to manually move them back in the
collections editore for the Tab control.

Any ideas ?

Thanks
 
C

Cor Ligthert

David,

Can you show us the part of the code where you bind the datasource of your
listview to the database.

(I don't know a datasource property from a listview therefore I ask it)

Cor
 
B

Brian Swanson

I've noticed similar behavior and always attributed it to some qwerky
bug in VS.NET. Typically I delete the control that's acting erradically
and recreate it and this usually solves the problem.

As far as the tabs swapping places, if this continues to happen I would
put some code in your form load handler to remove all tab and re-add
them in the order you want them. It may not look right in the IDE, but
it will always be right when the program is running.

Hope this helps,
Brian Swanson
 

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

Top