This is a migrated thread and some comments may be shown as answers.

[Solved] saving record in edit view - dropdownlist

2 Answers 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim
Top achievements
Rank 1
Tim asked on 08 Dec 2010, 10:14 AM
Hello,

im using the Dropdownlist to show some values. I want to use it in an edit view too, but im getting an error when i try to save a edited data record.

The property 'Bearbeitungsort' at 'Auftrag' could not be set to a 'null' value. You must set this property to a non-NULL value of type 'String'.

@Html.Telerik().DropDownListFor(model => model.Bearbeitungsort)
   .Name("DDLBearbeitungsort")
   .BindTo((IEnumerable<
SelectListItem>)View.ListeBearbeitungsort)
   .SelectedIndex(View.ListeBearbeitungsortIndex)

Whats wrong with my code?

Regards,
Tim

2 Answers, 1 is accepted

Sort by
0
Tim
Top achievements
Rank 1
answered on 13 Dec 2010, 10:45 AM
I'm not sure what i've changed but now i get the following error:

ArgumentNullException
"dataSource" cannot be null
Parametername dataSource
0
Tim
Top achievements
Rank 1
answered on 13 Dec 2010, 10:46 AM
double post.
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 1
Answers by
Tim
Top achievements
Rank 1
Share this question
or