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

Date column shows null/empty in kendo grid

3 Answers 216 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Madzie
Top achievements
Rank 1
Madzie asked on 26 Nov 2013, 05:12 AM
Here is my Model

model: {
id: "MSOrderNumber",
fields: {
     OrderNumber: { type: "number" },
    OrderDate: { type: "date" },
  },
},

The grid source's model is
public class Result
{
public string OrderNumber { get; set; }
public DateTime OrderDate { get; set; }
 }

The OrderNumber is bound properly but the OrderDate field shows up empty and also there is filter on this Date column, it should work on date filter.
Am I missing something here ? Any extra definition or anything like that required ?

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 Nov 2013, 01:33 PM
Hello,

Specifying the type of the field as "date" should be sufficient as long as the dates are serialized in a format recognized by Kendo UI. Could you show us how the dates are being serialized?

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Madzie
Top achievements
Rank 1
answered on 26 Nov 2013, 04:37 PM
This is the class and MSOrders property is what I bind to the grid.
It is simply DateTime class in .net.

public class MyModel
{ public List<MyResult> MSOrders { get; set; }
}
public class MyResult
{
public string OrderNumber: { get;set;}
public DateTime OrderDate {get;set;}
}
0
Atanas Korchev
Telerik team
answered on 27 Nov 2013, 07:38 AM
Hello,

We need the server output with the data which you are trying to bind the grid to.

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Madzie
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Madzie
Top achievements
Rank 1
Share this question
or