This is a migrated thread and some comments may be shown as answers.
How do I have an edit form for a different model than my grid display?
5 Answers 50 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthew
Top achievements
Rank 1
Matthew asked on 12 Aug 2011, 08:41 PM
I am using the Telerik MVC grid to display data that is mostly modified by the actual server itself when processes are run.  The grid is required to display the latest results from the database, and to make modifications to data items which may not even be part of the display (for example, I need to upload a file during the editing process, which will then update the grid with data the server gets from processing the file).

How can I accomplish this?

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Aug 2011, 12:05 PM
Hello Matthew,

 Telerik Grid for ASP.NET MVC will always pass the current model when rendering an editor template. The editing UI also allows to modify records present in the grid.

 Perhaps you can configure the grid to show only the required columns. If you use popup editing mode you would still be able to edit all available properties.

 Alternatively you can configure an external editing form (custom implementation) and refresh the grid once something changes.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Matthew
Top achievements
Rank 1
answered on 15 Aug 2011, 02:06 PM
Yeah, after doing some more research I pretty much figured those were my two main options, and I think the latter is probably the most ideal.

Thanks,
0
Naunihal
Top achievements
Rank 1
answered on 01 Sep 2011, 04:32 PM
Do you have a sample project showing this, i have exactly same requirements. using asp.net mvc3 razor
0
oliwa
Top achievements
Rank 1
answered on 22 Jan 2012, 06:44 AM
I need the same thing.  Is there a sample project showing a way to edit a different model than what the grid is bound to?
0
Petur Subev
Telerik team
answered on 23 Jan 2012, 08:26 AM
Hello Matthew,

You can use custom editor template in the grid popup editor form to achieve this. Check this Code Library article for implementation.
I hope this helps.

Kind regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Matthew
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Matthew
Top achievements
Rank 1
Naunihal
Top achievements
Rank 1
oliwa
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or