Problem Populating a List Box

Discussion in 'ASP .Net Web Controls' started by Lee Trotter, Jun 24, 2004.

  1. Lee Trotter

    Lee Trotter Guest

    I am trying to populate a list box from a dataset. There are two fields in
    the dataset and 5 rows. When I leave the .datatextfield and .datavaluefield
    blank I get 5 rows of 'System.Data.DataRowView'

    When I fill in those arguments with the field namesI get
    'System.Data.DataRowView' does not contain <fieldname>

    Here is the code I am using

    objDS2 = cData.GetProjectStatus

    cboFilter.DataSource = objDS2

    cboFilter.DataTextField = ("tblProjectStatus.fldProjectStatusDescription")

    cboFilter.DataValueField = ("tblProjectStatus.fldProjectStatusID")

    cboFilter.DataBind()



    Thanks
    Lee Trotter, Jun 24, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gerry
    Replies:
    0
    Views:
    534
    gerry
    Apr 24, 2004
  2. =?Utf-8?B?YXNhZA==?=

    Populating Drop down box value

    =?Utf-8?B?YXNhZA==?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    452
    Stephen
    Aug 2, 2005
  3. Gnarlodious
    Replies:
    4
    Views:
    17,551
    elizas
    May 5, 2010
  4. djjohnst
    Replies:
    13
    Views:
    445
    Mark Rae
    Jun 1, 2007
  5. Replies:
    4
    Views:
    7,732
    sindhoor
    Oct 7, 2009
Loading...

Share This Page