Daniel G
Daniel G

Reputation: 433

KendoUI Grid dataSource to json

I have an error on getting the data from the Grid as a json object

$('#AttachmentsGrid').data('kendoGrid').dataSource.view().toJSON()

TypeError: $("#AttachmentsGrid").data("kendoGrid").dataSource.view().toJSON is not a function

Upvotes: 1

Views: 2563

Answers (1)

VtoCorleone
VtoCorleone

Reputation: 17203

Use

JSON.stringify($('#AttachmentsGrid').data('kendoGrid').dataSource.view())

Upvotes: 3

Related Questions