473,756 Members | 7,817 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about listview dynamic control needed to handle changing

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?

Jul 13 '07 #1
1 2176
Hi,

"Ly**@ms.co m" <Ly*******@disc ussions.microso ft.comwrote in message
news:8B******** *************** ***********@mic rosoft.com...
>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.

Jul 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

55
4673
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's not obvious how the code works if you don't know the intricacies of the Property Let/Get syntax. Likewise, I dislike (and code to minimize the use of) the VB/VBA syntax of returning a value by referring to the function name as if it were a...
2
2437
by: VR | last post by:
Is there any to right-justify the 0th (main/item's) column in ListView? I have a ListView control, which I send a LVM_SETCOLUMNORDERARRAY message to change the order of columns. Neither before or after I send this message, I can right-justify the 0th column. Any ideas?
2
4733
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add images to listview also(This is to list all the items in my inbox, and want to give the user the feel of outlook). Since it hangs for even 1000 items in the inbox, i tried to shift to virtual listview. But virtual listview
7
6449
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override ListView.Items.Add(), . I see that it is a virtual method so it should be easy to do. If anyone can help I would appreciate it greatly. I can do what I need to do in a different way this would just make everything significantly cleaner and eaasier...
13
3771
by: Maheshkumar.R | last post by:
hi groups, I have placed an listview control, i want to iterate thru the control and find the clicked event items. listView2.Items.Add(fname.ToString(), i); how i can perform the iteration to find the item clicked...? and its item. thankz-- Mähésh Kumär. R
7
15003
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The MyList data is resident in a dataset table. I'm stuck and can't choose either because. If I choose ListView as my control I don't understand how to programmatically get the data from the dataset table
3
1470
by: Henry | last post by:
I know it is possible to store dynamic propterties for applications in XML files. The app.config and the web.config files can be used to store AppSettings... I am just wondering how far one can go with this technique. In my case, what I am interested in doing is to store information about reports and report parameters that I might want to use in an XML file. Ideally I'd like to get to the point answer and respond to the following...
4
4515
by: Brian Gaze | last post by:
I have created a ListView control and have bound this to a datasource. Within the ItemTemplate of the ListView I have added another ListViewControl which is databound in the code behind. The idea is that when clicking on the "Show details" button the ListView for the appropriate row binds in the codebehind and displays the detail data for the selected row. I did something similar with a gridview control previously, but want to be able to...
2
6172
by: witpo | last post by:
Hi, I would like to display all listview items in one row with scroll bar below it – instead of multiple rows and scroll bar on the right. Someone told me that I can achieve it using LVM_SETITEMPOSITION message. According to my knowledge code below should set position for each item added to listView control. There are two ways of doing it - we can use MessageWindow.SendMessage from Microsoft.WindowsCE.Forms or use DllImport and SendMessage....
0
10040
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9873
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9713
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.