Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Noob question - binding data to list box (system.data.datarowview?)

Reply
Thread Tools

Re: Noob question - binding data to list box (system.data.datarowview?)

 
 
Lloyd Sheen
Guest
Posts: n/a
 
      04-17-2008

"Arch Stanton" <> wrote in message
news:. ..
> I'm trying to bind data in a dataset (obtained from an Access DB) to a
> listbox in ASP.net. I know my dataset is being created properly because it
> displays fine in a datagrid, but I can't get it to display in a listbox.
> Here's what I'm trying:
>
> dgrDataGrid.DataSource = dstData.Tables("Manufacturer")
> lstMake.datasource = dstData.Tables("Manufacturer")
> Page.DataBind
>
> There is only one column in the dataset's table, and the datagrid displays
> it the way I want. But my listbox just repeats the line
> "system.data.datarowview" over and over.
>
> Any help is, as usual, appreciated.


You need to tell the listbox what to display. The default is the .toString
so you are getting the object type as each occurence.

LS

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Noob question - binding data to list box (system.data.datarowview?) David Wier ASP .Net 0 04-17-2008 05:03 PM
Here a noob, there a noob.... JimDoire MCSE 0 04-10-2008 07:23 PM
Complex data binding question, binding child objects of a custom collection. JcFx ASP .Net Datagrid Control 0 06-01-2005 04:01 PM
populate one list box with selected values from another list box steven.cooper@infocision.com ASP .Net 1 03-12-2005 11:29 PM
Data Binding - using inline code vs. functions vs. straight binding Jordan ASP .Net 2 02-10-2004 08:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57