Solved

ASP.Net Dual Listbox updating

Posted on 2009-03-30
3
406 Views
Last Modified: 2012-05-06
I have an ASP.Net page. Code is C#. The page displays 2 listboxes side-by-side. The first listbox displays data from a table in a database (MS Access). It lists all available products. The second list box displays all of the products that the user has selected. The second listbox's data will come from another table. Once a user selects a product and clicks the correct button, the product is moved to the seond listbox. I need to display the correct data in that second listbox based on the users login information. That second table will record product id and user id. The second listbox also needs the funtionality to move products up and down in rankings. Any help/samples with this is appreciated.
0
Comment
Question by:dodgerfan
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24027596
Is this your question?

      "I need to display the correct data in that second listbox based on the users login information"
0
 

Author Comment

by:dodgerfan
ID: 24028809
Sorry, I worded this horribly. My question is how I can move records up and down in the second list box. I have the functionality to display the data in each listbox, and move a record into the second box fromm the first. I want the user to be able to move the records up and down( they are ranking them). Does that make any more sense?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 24030907
If you are binding a ListBox to a DataTable, and you want to control the order of the items in the ListBox, then I would suggest adding an Integer sorting column to the DataTable, creating a DataView from the DataTable, and then bind the ListBox to the DataView, with the Sort property set to the sorting column.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now