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

[Solved] Different Client Edit and Display Templates

1 Answer 109 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.
Joe
Top achievements
Rank 2
Joe asked on 10 Oct 2011, 09:26 PM
I'm using Ajax binding with InForm editing mode.  Following the docs, it's easy to specify a ClientRowTemplate.  However, what I want to do is show one client template for display and another for editing.  i.e. display in tabular format, but edit in a custom shape.  What's the recommended technique to display separate templates for display and edit mode in the ClientRowTemplate method?

1 Answer, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 2
answered on 12 Oct 2011, 12:04 AM
Found what I was looking for.  Since the grid implements EditorFor<>, all I need to do is implement an editor template for my model.

Pretty elegant.
Tags
Grid
Asked by
Joe
Top achievements
Rank 2
Answers by
Joe
Top achievements
Rank 2
Share this question
or