List view question
-
Hi guys, I have a list view that i want to to clear so that i can import data from a serialized file in it. i use the
listview1.Clear()
command that clears also the column headers, and the de-serialization doesn't work without the column headers. I have tried before the Clear() method this code :System.Windows.Forms.ListView.ColumnHeaderCollection coloane = listView1.Columns; foreach (ColumnHeader header in coloane) { listView1.Columns.Add(header.Text); } listView1.Clear();
and still it doesn't work. Any suggestions on how to clear a ListView without the colum headers ? Regards, Alex“Be the change you want to see in the world.”
-
Hi guys, I have a list view that i want to to clear so that i can import data from a serialized file in it. i use the
listview1.Clear()
command that clears also the column headers, and the de-serialization doesn't work without the column headers. I have tried before the Clear() method this code :System.Windows.Forms.ListView.ColumnHeaderCollection coloane = listView1.Columns; foreach (ColumnHeader header in coloane) { listView1.Columns.Add(header.Text); } listView1.Clear();
and still it doesn't work. Any suggestions on how to clear a ListView without the colum headers ? Regards, Alex“Be the change you want to see in the world.”
try ListView.Items.Clear() to clear the content, not the view itself. :)
-
Hi guys, I have a list view that i want to to clear so that i can import data from a serialized file in it. i use the
listview1.Clear()
command that clears also the column headers, and the de-serialization doesn't work without the column headers. I have tried before the Clear() method this code :System.Windows.Forms.ListView.ColumnHeaderCollection coloane = listView1.Columns; foreach (ColumnHeader header in coloane) { listView1.Columns.Add(header.Text); } listView1.Clear();
and still it doesn't work. Any suggestions on how to clear a ListView without the colum headers ? Regards, Alex“Be the change you want to see in the world.”
try
listView1.Items.Clear();
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
try ListView.Items.Clear() to clear the content, not the view itself. :)
beat me to it :laugh:
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
try
listView1.Items.Clear();
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)10x a lot :) it works fine:):D I should of thought of that :D Regards, Alex
“Be the change you want to see in the world.”