Using Dropdownlist in Gridview for editing purposes

Discussion in 'ASP .Net Datagrid Control' started by et, Jan 25, 2007.

  1. et

    et Guest

    I have a drop down list in a gridview edit template column. Two questions:

    When I go into DataBindings, and attempt to select a field for a data
    binding, it is greyed out, so I have created a custom binding to a field
    from the datasource Why is this greyed out, what conditions have to be met?
    I have other gridviews that it is not greyed out and I do not see the
    difference.

    The second problem is when a record related tothat field is null, I get a
    "System.ArgumentOutOfRangeException: 'DropDownList1' has a SelectedValue
    which is invalid because it does not exist in the list of items."

    I tried adding a blank item in the list but still get the error. How can I
    fix this?
    et, Jan 25, 2007
    #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. Ken McAndrew

    Validators at cross purposes?

    Ken McAndrew, Jan 5, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    378
    Ken McAndrew
    Jan 6, 2004
  2. Edwin Knoppert
    Replies:
    3
    Views:
    353
    Edwin Knoppert
    Jan 27, 2006
  3. =?Utf-8?B?ZGF2ZS5kb2xhbg==?=

    Tree View for Non-Navigational Purposes

    =?Utf-8?B?ZGF2ZS5kb2xhbg==?=, Mar 19, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    3,188
    =?Utf-8?B?ZGF2ZS5kb2xhbg==?=
    Mar 20, 2006
  4. Replies:
    0
    Views:
    572
  5. katmagic
    Replies:
    0
    Views:
    298
    katmagic
    Dec 26, 2008
Loading...

Share This Page