question about listview dynamic control needed to handle changing

G

Guest

I have a executable winforms application I would like to change.
I use quite a number of listview controls in my main form.
I dump about 15 columns of data into a couple of listviews.
This data comes from classes that implement Ienumerable ...

I use a method in the main form to update the listviews... s.

I want to change this application to

Only to show 4 columns of data (new data)

Have the ability for the user to choose at a right context menu click of the
listview to add up to 19 columns of data And have this data sorted in the
list view after choosing the column and sorting

QUESTION:
Is the correct thing to do to populate the listview with 19 columns of
string data and recreate the listview to try to hide the unwanted 15 columns
Let the user choose what columns he/she wants in the right context menu and
let the listView handle the sort and show only the columns selected

-or-

Create a new hashtable with 19 columns of data Recreate a new listview in
place with the user selected data columns kill the old one and pump in only
the data from the sorted and related hashtable


-or-

Something else?
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

I have a executable winforms application I would like to change.
I use quite a number of listview controls in my main form.
I dump about 15 columns of data into a couple of listviews.
This data comes from classes that implement Ienumerable ...

I use a method in the main form to update the listviews... s.

I want to change this application to

Only to show 4 columns of data (new data)

Have the ability for the user to choose at a right context menu click of
the
listview to add up to 19 columns of data And have this data sorted in the
list view after choosing the column and sorting

QUESTION:
Is the correct thing to do to populate the listview with 19 columns of
string data and recreate the listview to try to hide the unwanted 15
columns
Let the user choose what columns he/she wants in the right context menu
and
let the listView handle the sort and show only the columns selected

19 colmns are a lot, but nothing crazy.

Test how fast it run and decide, the other option you have is simply to add
just the columns you need.
 

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