Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Using Dropdownlist in Gridview for editing purposes

Reply
Thread Tools

Using Dropdownlist in Gridview for editing purposes

 
 
et
Guest
Posts: n/a
 
      01-25-2007
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?



 
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
Launching an event from a dropdownlist in a gridview while editing katmagic ASP .Net 0 12-26-2008 06:24 PM
DropDownList inside GridView: How to set SelectedIndex for the DropDownList? keithb ASP .Net 1 11-01-2006 05:24 AM
GridView: Filter DropDownList for another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-29-2005 07:44 AM
GridView: Filtr DropDownList from another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-23-2005 01:31 PM
PBR for load sharing purposes paranic Cisco 2 11-02-2005 02:37 PM



Advertisments