Linked Questions

-3 votes
1 answer
283 views

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);
NullReferenceException's user avatar
53 votes
7 answers
402k views

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 ...
amedeiros's user avatar
  • 949
3 votes
3 answers
19k views

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 ...
Boris's user avatar
  • 9,041
1 vote
2 answers
12k views

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. ("...
user1353517's user avatar
1 vote
4 answers
12k views

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 ...
user avatar
1 vote
1 answer
6k views

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 ...
P1nGu1n's user avatar
  • 594
-1 votes
2 answers
5k views

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 ...
Ionel Vaidianu's user avatar
0 votes
2 answers
4k views

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", ...
Juss's user avatar
  • 177
0 votes
1 answer
4k views

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 ...
Yuki Kutsuya's user avatar
  • 4,108
1 vote
1 answer
3k views

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 ...
HelpNeeder's user avatar
  • 6,520
2 votes
2 answers
1k views

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 ...
Zac Voicheq's user avatar
0 votes
2 answers
2k views

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 ...
septaug's user avatar
  • 61
-3 votes
1 answer
813 views

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(...
Mine Dyse's user avatar
0 votes
2 answers
1k views

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? " ...
PaeneInsula's user avatar
  • 2,110
0 votes
2 answers
701 views

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 ...
duney's user avatar
  • 157

15 30 50 per page