Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP.Net Dual Listbox updating

Posted on 2009-03-30
3
Medium Priority
?
443 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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 response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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