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

DropDownListFor in grid - cannot get access to selected item in update

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MarkBr
Top achievements
Rank 2
MarkBr asked on 20 Aug 2014, 04:56 PM
Hi,

I cannot figure out how to get access to dropdown selected item in the update procedure.

See attached files.

Regards


1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 22 Aug 2014, 11:53 AM
Hello Mark,

You have configured the DropDownList properly - you should omit the name (I can see you have commented it which is okey) or you have to use the same name as the name of the property (in your case City_Id).

The option that I can suggest you to try to change is the ValuePrimite option - it tells the MVVM framework that the field that is going to be updated should be updated with the value of the DropDownList not the whole DataItem.

If this does not help please demonstrate your case with a small demo so we can see why exactly the Customer object is not updated properly inside the Customers_Update action method.

Kind Regards,
Petur Subev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
MarkBr
Top achievements
Rank 2
Answers by
Petur Subev
Telerik team
Share this question
or