?
Solved

ASP.Net Dual Listbox updating

Posted on 2009-03-30
3
Medium Priority
?
438 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 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