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

[Solved] MVC Grid Edit question

1 Answer 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bart
Top achievements
Rank 1
Bart asked on 18 Feb 2011, 01:23 PM
Hi,

I am new to MVC, so maybe bear with me.

My grid displays users from the DB.  I want to make it editable, so I followed the intructions in the help and videos.
So i set my datakeys like this:
       .DataKeys(keys => keys.Add(u => u.UserId))

In my controller I get back my UserId.

Okay, but what I cant figure out is how to get the rest of my model (the user in this case)...
I can't update my DB if I don't have the other properties.

In an ordinary MVC app I would post back the object (User), but how do you do is using the Telerik grid?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Bart
Top achievements
Rank 1
answered on 19 Feb 2011, 08:46 PM
Never mind.
using the UpdateModel, it works fine...
Tags
Grid
Asked by
Bart
Top achievements
Rank 1
Answers by
Bart
Top achievements
Rank 1
Share this question
or