Hi,
I've created a DataSet and within that I've created a DataTable and a TableAdapter. I have then used this to add a ListObject to a worksheet. However, I've now added a new column to the DataTable and want to add this to the ListObject without having to delete and re-create the ListObject. Is there a way of doing this ?
I'm using Visual Studio 2008 and Excel 2007.
Thanks
Dave
Are you using a listBox or a listView? ListBoxes will not do multi column without some creative constructor overrides apparently.
List Views will by using...
(Set the view property to details, and there is a colums property collection that you can edit.)
Set the view property to details, and there is a colums property collection that you can edit.ListViewItem myItem = new ListViewItem(); myItem.Text = person1.FirstName; myItem.SubItems.Add(person1.LastName); myItem.SubItems.Add(person1.Age.ToString()); listView1.Items.Add(myItem);
I'm sort of a .NET newbie myself and maybe they are wanting to repurpose the listbox object. I can't seem to find anything about multiple columns like you could in VB6.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks