Hi,
what I undesrstand ... is that you have some values in database... from
those values ListBox/dropdown is populated... User select some item and it
is saved in database.
when next time page is loaded and dropdown is populated you want to show the
item on top that user selected last time...
you can use the following scenario
First get the value from database that user selected last time let say that
item is "potato"
then dropdown.items. findByText("pot ato").selected= true;
this statement will make it selected
in above case you might get error that dropdown cannot have multiple indexes
selected
then you can try this
for(int i=0;i<ddl.Items .Count;i++)
{
ddl.Items[i].Selected=false ;
}
ddl.Items.FindB yText("child"). Selected=true;
"John" <Jo**@discussio ns.microsoft.co m> wrote in message
news:11******** *************** ***********@mic rosoft.com...
I have a listbox that is databound when my form loads. A user
can then select and option using a drop down box. When the user
selects an option the corresponding items in the listbox gets selected.
How can I show those selected items at the top of my listbox. The
issue is when the user selects an item and it is in the middle of the
list,
the user is not able to know an item it is selected or not unless they
scroll
through the listbox.