Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 23rd, 2007, 10:34 AM
Registered User
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ganeshkuppuswamy
Default List box bounded with dataset

Hi all

I am using visual studio 2005 (c#) for developing my windows application. I am having two list boxes, I want to transfer selected items from one list box to another list box. When the list box contain normal data (i.e. List items not from the database). The below CODE:1 works fine.


foreach (object item in listBox1.Selecteditems)
string ite = item.ToString();


listBox1.DataSource = datasetName.Tables["table_name"];
listBox1.DisplayMember = "Column_name";
listBox1.ValueMember = "Column_name";

The problem is when I am populating the listitems from the database using CODE:2 .The CODE:1 instead of transferring selected items to the destination list box, It transferring "System.Data.DataRowView" to the destination list box. Help me to solve this.


Similar Threads
Thread Thread Starter Forum Replies Last Post
C# - update list box after write dataset xm rrflore2 ASP.NET 2.0 Basics 2 July 9th, 2007 08:36 AM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
select box/List box alphabetic sort sasidhar79 Javascript How-To 3 November 10th, 2004 03:04 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM
Search using drop down list box and a text box tcasp Classic ASP Basics 1 July 31st, 2003 02:58 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.