0
votes

I have a Kendo grid that has a foreign key column as follows...

.Columns(col =>
{
   col.ForeignKey(c => c.ScheduleID, (System.Collections.IEnumerable)ViewBag.schedules, "ID", "EventDate").Title("Date");
})

Currently, the column is displayed as a DateTime like '01/18/2016 12:00:00:00 AM' and I would like to have it as '01/18/2016'. I know on a 'Bound' column, you can use the .ClientTemplate to format the date time field, but how can I do this same thing on a foreign key column?

1

1 Answers

0
votes
.Columns(col =>
{
   col.ForeignKey(c => c.ScheduleID, (System.Collections.IEnumerable)ViewBag.schedules, "ID", "EventDate").Title("Date").Format("{0:M/d/yyyy}");
})