HighTechTalks DotNet Forums  

Using Dropdownlist in Gridview for editing purposes

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Using Dropdownlist in Gridview for editing purposes in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
et
 
Posts: n/a

Default Using Dropdownlist in Gridview for editing purposes - 01-25-2007 , 11:08 AM






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 Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.