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

Kendo Grid Data source event

1 Answer 103 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Tomasz asked on 28 Mar 2014, 02:33 PM

I have the following kendo grid in my page:

 .Columns(columns =>
columns.Bound(c => c.IsError);
columns.Bound(c => c.EventDateTime).Title(@Di.Nls.Label.Event_Date_Time);
columns.Bound(c => c.Details).Title(@Di.Nls.Label.Details);
columns.Bound(c => c.Description).Title(@Di.Nls.Label.Description);
columns.Bound(c => c.Result).Title(@Di.Nls.Label.Result);
"<tr bgcolor=#:IsError ? 'Pink' : 'White'# data-uid='#: uid #'>" +
  "<td>" +
  "# if(IsError == true) {# " +
"<img src='/Images/FileState/Error.gif' />" +
"#} else {# " +
"<img src='/Images/FileState/Ok.gif' />" +
"#}#" +
  "</td>" +
  "<td>#: EventDateTime #</td>" +
  "<td>#: Details #</td>" +
  "<td>#: Description #</td>" +
  "<td>#: Result #</td>" +
.DataSource(dataSource => dataSource
.Model(model => model.Id(p => p.ID))
.Read(read => read.Action("FileAuditingDetails", "FileDetails", new { iFileID = iFileID }))

function onRequestEnd(e) {
  //do something with event date time

My goal is to format the "Event date time" column so it provides a value based on the user time zone info. In order to do that I wanted to handle the "requestEnd" event, but when I do that I cannot see any data on the grid.

Removing the following line .Events(e=>e.RequestEnd("onRequestEnd")) load all the data correctly.

Any ideas how to achieve my goal?

1 Answer, 1 is accepted

Sort by
Alexander Popov
Telerik team
answered on 01 Apr 2014, 09:30 AM
Hi Tomasz,

I would recommend checking this Code Library project, where similar behavior is illustrated.

Alexander Popov

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

Asked by
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question