This question is locked. New answers and comments are not allowed.
Hi again.
I'm trying to create a grid with two date columns. The grid is Ajax bound and it's ignoring the .Format(...) method... here's the example:
| <%= Html.Telerik().Grid<LocalViewModel.LocalCentroServicioVM>() |
| .Name("GridCentrosServicio") |
| .DataKeys(keys=>keys.Add(o=>o.Id)) |
| .DataBinding(binding=>binding.Ajax().Select("_obtenerCentrosServicio","Local")) |
| .Sortable() |
| .Pageable() |
| .Filterable() |
| .Columns(col => |
| { |
| col.Bound(o => o.CentroServicio.TipoServicio.Nombre).Title("Tipo").Width(200); |
| col.Bound(o => o.CentroServicio.Nombre); |
| col.Bound(o => o.FechaAlta).Format("{0:dd/MM/yyyy}").Width("200px"); |
| col.Bound(o => o.FechaBaja).Format("{0:dd/MM/yyyy}").Width("200px"); |
| })%> |
the object model properties for this dates is this one:
| [DataType(DataType.Date), DisplayName("Fecha Alta")] |
| public DateTime FechaAlta { get; set; } |
| [DataType(DataType.Date), DisplayName("Fecha Baja")] |
| public DateTime FechaBaja { get; set; } |
The resuls is the grid showing the long date format "Tue Mar 16 15:29:05 UTC+0100 2010" instead the one I provide.
Any clue on this?
Thanks