Include a static item in a databound list control

  • Thread starter Thread starter Tom McDonnell
  • Start date Start date
T

Tom McDonnell

I'm wanting to have a static 'All items' entry appear as the first item
in a data-bound combobox. The underlying data is sorted, and will be
added to/modified/deleted. Maintaining a separate table which is a
manually ordered version of the original table with the desired entry as
the first item, and binding to it is quite a task. Are there any simpler
solutions?
 
Good question, not sure either but I will look into it

--
Regards - One Handed Man

Author : Fish .NET & Keep .NET

==============================
 
You can bind the combobox, and the insert a new item that says All Items as
the first item.
 
Thanks for the reply but this really doesn't work. With the list sorted
an item can appear before an 'All Items' entry, 'AAA' for example.
 
Yes your right it doesent work. IN fact doing this will throw an exception
when the listbox is bound to a datasource.

I tried using the insertAt method of the table, but for some reason it wants
to put the row at the end regardless of what position you want to try and
insert it!!

--
Regards - One Handed Man

Author : Fish .NET & Keep .NET

==============================
 
Back
Top