Using Dropdownlist in Gridview for editing purposes

E

et

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top