On a grid is it possible to display an error message from the viewmodel datasource in the no records template?
I know you can display a custom string like this.
data-no-records="{ template: 'No Records Today!'}"
3 Answers, 1 is accepted
0
Georgi
Telerik team
answered on 06 Jun 2019, 01:02 PM
Hello Perry,
A possible solution would be to insert the error message to the no records element within the error event handler of the dataSource.
e.g.
onError: function (e){
$('.k-grid-norecords-template').html(e.message)
}
Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
My bad, it's a typo. Indeed the event is called `error`.
e.g.
error: function (xhr, error) {
...
Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.