I have been playing around with the ListView control library and are having a few hassles that is no doubt a lack of understanding on my part.
What I have tried to find out is how to manipulate the Listview tables to avoid unnecessary load on the CPU or consumption of memory while the application is running. My understanding is that Table and Listview work almost identicle, except that Listview has extra features. (?)
The app' that I am working on utilises two Listview tables. One of them is "invisible" and is populated when the application is started using LoadCSV. This table is regularly accessed and values read, added and removed. So the table itself remains active all the time in the background.
The second Listview table that I have is on a form that is only accessed every now and then. It has the potential to grow into a large table, so my intention is to only load it up when needed and get rid of it as soon as I'm finished with it, so that memory is freed up, etc. During this use the Form and its Table are made visible.
Occassionally though, I need to manipulate this second table without actually viewing the Form that it is on. In these cases I am intending to create the Listview table on its normal form, but not actually Show the form. Once the manipulation is completed, then I once again want to remove it from memory.
My question is how to go about doing all this using the RemoveAllRows, Close, Dispose, etc (or any other) methods. To achieve my goal of easing the load on the CPU and freeing up memory, should I only look at removing the rows (data) but leave the Table intact, or should I be "unloading" (disposing?) everything associated with it.
Which ever path is advisable, what methods should be used and in what order.
I have done heaps of experimentation and I keep coming up with errors when trying to recreate a "disposed" listview (table), or the table not being "repopulated" when using LoadCSV, etc. These problems are only happening when I am trying to access the tables multiple times.
I'm obviously missing some minor key point, but have been unable to put my finger on it.
Any advice will be much appreciated (as always).
Burd.
What I have tried to find out is how to manipulate the Listview tables to avoid unnecessary load on the CPU or consumption of memory while the application is running. My understanding is that Table and Listview work almost identicle, except that Listview has extra features. (?)
The app' that I am working on utilises two Listview tables. One of them is "invisible" and is populated when the application is started using LoadCSV. This table is regularly accessed and values read, added and removed. So the table itself remains active all the time in the background.
The second Listview table that I have is on a form that is only accessed every now and then. It has the potential to grow into a large table, so my intention is to only load it up when needed and get rid of it as soon as I'm finished with it, so that memory is freed up, etc. During this use the Form and its Table are made visible.
Occassionally though, I need to manipulate this second table without actually viewing the Form that it is on. In these cases I am intending to create the Listview table on its normal form, but not actually Show the form. Once the manipulation is completed, then I once again want to remove it from memory.
My question is how to go about doing all this using the RemoveAllRows, Close, Dispose, etc (or any other) methods. To achieve my goal of easing the load on the CPU and freeing up memory, should I only look at removing the rows (data) but leave the Table intact, or should I be "unloading" (disposing?) everything associated with it.
Which ever path is advisable, what methods should be used and in what order.
I have done heaps of experimentation and I keep coming up with errors when trying to recreate a "disposed" listview (table), or the table not being "repopulated" when using LoadCSV, etc. These problems are only happening when I am trying to access the tables multiple times.
I'm obviously missing some minor key point, but have been unable to put my finger on it.
Any advice will be much appreciated (as always).
Burd.