Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Guide me how to show previously selected item in listbox



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> ASP & ASP.NET Forum
View previous topic :: View next topic  
Author Message
frmsasp



Joined: 03 Sep 2005
Posts: 8

PostPosted: Wed Oct 12, 2005 6:08 am    Post subject: Guide me how to show previously selected item in listbox Reply with quote

Dear Friend,


Is anybody guide me how to show previously selected item in a listbox ?


I had used listbox control with multiple selection mode. I stored id with comma delimiter in database.

e.g.

1. List Item One.
2. List Item Two.
3. List Item Three.
4. List Item Four.
5. List Item Five.

Suppose user select item 2, 4 & 5. So I will store it as a 2,4,5 in database. This will work fine.

Now in editing I have to shows selection-bar for item 2, item 4 & item 5. So I had typed below source.

LstBoxPropHandling.SelectionMode = ListSelectionMode.Multiple;

for (j=0; j < PropSplit.Length; j++)
{
LstBoxPropHandling.SelectedValue = PropSplit[j].ToString();
}


But with this statement I got only last item id as a selected item with selectionbar. In our example 2,4,5 only item whose
id is 5 got as a selected item.

Is anybody guide me how to make item 2, item 4, item 5 as a selected item ?


Thanking You,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> ASP & ASP.NET Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap