Solved

ASP.Net Dual Listbox updating

Posted on 2009-03-30
3
421 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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