PC Review


Reply
Thread Tools Rate Thread

Include a static item in a databound list control

 
 
Tom McDonnell
Guest
Posts: n/a
 
      25th Aug 2003
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?

 
Reply With Quote
 
 
 
 
One Handed Man
Guest
Posts: n/a
 
      25th Aug 2003
Good question, not sure either but I will look into it

--
Regards - One Handed Man

Author : Fish .NET & Keep .NET

==============================
"Tom McDonnell" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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?
>



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      25th Aug 2003
You can bind the combobox, and the insert a new item that says All Items as
the first item.

"Tom McDonnell" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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?
>



 
Reply With Quote
 
Tom McDonnell
Guest
Posts: n/a
 
      26th Aug 2003
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.

Marina wrote:
> You can bind the combobox, and the insert a new item that says All Items as
> the first item.
>
> "Tom McDonnell" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>
>>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?
>>

>
>
>


 
Reply With Quote
 
One Handed Man
Guest
Posts: n/a
 
      26th Aug 2003
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

==============================
"Tom McDonnell" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>
> Marina wrote:
> > You can bind the combobox, and the insert a new item that says All Items

as
> > the first item.
> >
> > "Tom McDonnell" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> >
> >>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?
> >>

> >
> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Q: dynamically created databound controls persist but static controlsdon't mad.scientist.jr@gmail.com Microsoft ADO .NET 0 4th Apr 2008 01:49 AM
Q: dynamically created databound controls persist but static controlsdon't mad.scientist.jr@gmail.com Microsoft ASP .NET 0 4th Apr 2008 01:49 AM
Drop down list error: "Databinding methods such as Eval(), XPath(),and Bind() can only be used in the context of a databound control." yosri2005@gmail.com Microsoft ASP .NET 0 13th Dec 2007 03:00 PM
adding another item to a list of fields coming from a table inside of a list control thread Microsoft Access 8 28th Feb 2007 08:06 PM
DataGridView ComboBox column with databound item list sklett Microsoft C# .NET 3 6th Sep 2006 12:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:10 PM.