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

[Solved] Calls to .Template() being ignored

1 Answer 75 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.
Mike
Top achievements
Rank 1
Mike asked on 10 Jul 2012, 03:13 PM
I have a grid (using Ajax databinding) in which I have setup a master detail view. The structure is like this:

MasterGrid.DetailView.Template()
TabStrip.Items
DetailGrid

The MasterGrid and DetailGrid both contain the exact same kind of data (master being the most current instance of something and detail containing past instances of the same thing). The formatting (i.e. Template) on the master grid and the detail grid needs to be the same (and it is setup that way) . The ClientTemplate stuff is also setup the same way meaning the MasterGrid and the DetailGrid match their calls to ClientTemplate.

My issue is that the ClientTemplate calls in the DetailGrid are working just fine but the calls to Template appear to be ignored (although the columns appear in order as specified)

Any help would be great.

1 Answer, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 10 Jul 2012, 08:33 PM
I am not sure why Template was being ignored!

However, I did realize that the way I had the grids configured was causing the problem. Setting the GridOperationMode to Client alone is not enough to ensure client only.

Each call must have a GridActionAttribute on top of the action method used by the grid and these methods must return a GridModel with its Data set to IEnumerable<YourModelType>.

These methods called via ajax should not be the action method that is called originally to setup the view.
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Share this question
or