Linked Questions
22 questions linked to/from C# listView, how do I add items to columns 2, 3 and 4 etc?
-3 votes
1 answer
283 views
Populating listView items [duplicate]
How to add an item on the third column? I have a code but it only adds an item upto the second column. lstProjectFiles.Items.Add(f3.FullName).SubItems.Add(f4.FullName);
53 votes
7 answers
402k views
Add item to Listview control
I have a listview in c# with three columns and the view is details. I need to add a item to each specific column but I am having a hard time with this. I have tried several things. Here is what I got ...
3 votes
3 answers
19k views
Inserting an item into a C# Winforms listview
The following line gives me a serious headache: listView1.Items.Insert(0, new ListViewItem("Test", listView1.Groups[0])); All I want to do is insert an item into a list view. The listview is in ...
1 vote
2 answers
12k views
Display multiple columns from Database in ListView
I'm not sure why this isn't working. I'm trying to display 2 columns from my database side by side in a listview box on my form. When I use this it doesn't display any of the data correctly. ("...
1 vote
4 answers
12k views
SQL export to ListView using C#
I have a query that selects 3 columns from a SQL table, I need to export the resulting query into a listview. I don't need any help with the SQL setup, just how to format it into the listview. There ...
1 vote
1 answer
6k views
Missing ListView.Columns in WPF
I'm writing an application with a ListView in C# WPF. I was wondering if I was missing a reference of something, because I get this error all the time: 'System.Windows.Controls.ListView' does not ...
-1 votes
2 answers
5k views
WPF Add listview item in listview created dynamically
This is my first question here :) I create a listview columns form a textfile in Window_Loaded() After this I want to add items to this listview... foreach (KeyValuePair<string, string> key in ...
0 votes
2 answers
4k views
ListView Columns
I have 2 columns in a ListView. My "C:\file.txt" looks like this: 1;aaa 2;bbb 3;ccc 4;ddd and so on. (each number and text in separate line) My code: FileStream spis = File.Open("C:\\file.txt", ...
0 votes
1 answer
4k views
ListView adding items with subitems
I'm trying to read a file line by line, which works perfectly but I want to seperate the results I get into subitems in the listview. I am also searching for all .jar files in the folder so I can use ...
1 vote
1 answer
3k views
How to add multiple items so it displays data through out columns in ListView in detailed mode using a loop?
I am just trying to figure out how to work this out. So, I I have figured out how to create new column in my ListView. I have also figured out how to add an item to my ListView. The problem is that ...
2 votes
2 answers
1k views
How to submit textbox text to listView in matching column in separate form
So I have Form1 and Form2. Form1 has listView1 inside which has 3 columns. Form2 has 3 textbox's which hold text. On Form2 there is a button to submit the text to the matching columns of Form1. How ...
0 votes
2 answers
2k views
c# add columns to listbox and clear list items
I have a winforms app in C# in which the user must select data from a combobox those items are then listed in a listbox. The problems I have are as follows: If the user selects an item the result ...
-3 votes
1 answer
813 views
How to add items on listview (each column)
I tried using this code to add items on ListView but clearly I only add one column on each rows although I have 10 columns. Here's my code: ListView1.Items.Add(firstname.Text) ListView1.Items.Add(...
0 votes
2 answers
1k views
listview c#: how to add items to columns other than the first
My question is an exact duplicate of this: "To add items to column 1 in my listView control (Winform) I'm using listView1.Items.Add, this works fine but how do I add items to columns 2 and 3 etc? " ...
0 votes
2 answers
701 views
Iteratively add ListViewItems to multiple columns
I have a ListView with two columns specified in the design view and I'm trying to add two lists of records to their respective columns, but I'm struggling to get the lists in the right place. I've ...