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

ClientTemplate DateTime issue

1 Answer 55 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 06 Jul 2012, 08:10 PM
I have the following:

		columns.Bound(model => model.DateAdmitted)
			.Template(o => o.DateAdmitted.ToString("d"))
			.ClientTemplate(					 
				"<#= DateAdmitted #>"
			);

The grid is Ajax().OperationMode(GridOperationMode.Client)

The initial rendering of the grid works fine (and so the call to Template() is working). When I page forward and back the dates end up looking like:

Date(-62135578800000)/

DateAdmitted is a regular DateTime object.

Can someone tell me what is going on and how to fix it?

1 Answer, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 06 Jul 2012, 08:51 PM
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Share this question
or