{"action":"opened","issue":{"url":"https://api.github.com/repos/kendo-labs/knockout-kendo/issues/185","labels_url":"https://api.github.com/repos/kendo-labs/knockout-kendo/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/kendo-labs/knockout-kendo/issues/185/comments","events_url":"https://api.github.com/repos/kendo-labs/knockout-kendo/issues/185/events","html_url":"https://github.com/kendo-labs/knockout-kendo/issues/185","id":72059239,"number":185,"title":"how to get the grid data object in view model?","user":{"login":"siminture","id":1584380,"avatar_url":"https://avatars.githubusercontent.com/u/1584380?v=3","gravatar_id":"","url":"https://api.github.com/users/siminture","html_url":"https://github.com/siminture","followers_url":"https://api.github.com/users/siminture/followers","following_url":"https://api.github.com/users/siminture/following{/other_user}","gists_url":"https://api.github.com/users/siminture/gists{/gist_id}","starred_url":"https://api.github.com/users/siminture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siminture/subscriptions","organizations_url":"https://api.github.com/users/siminture/orgs","repos_url":"https://api.github.com/users/siminture/repos","events_url":"https://api.github.com/users/siminture/events{/privacy}","received_events_url":"https://api.github.com/users/siminture/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-30T04:24:37Z","updated_at":"2015-04-30T04:24:37Z","closed_at":null,"body":"```\r\n<div id=\"user-list-wrap\">\r\n    <div id=\"user-list-grid\" data-bind=\"kendoGrid: { data: dataSource,  sortable: true}\"></div>\r\n</div>\r\n<button type=\"button\" data-bind=\"kendoButton:exportExcel\">save as excel</button>\r\n<script>\r\nvar viewModel = {\r\n     ....\r\n    exportExcel: function() {\r\n              var grid = ??? // how to get the grid object?\r\n              // var grid = $(\"#user-list-grid\").data(\"kendoGrid\");  // i think this way is not good \r\n              grid.saveAsExcel();\r\n    }\r\n}\r\n<script>\r\n```\r\n"}}