I use gijgo from http://gijgo.com/Grid/ for a datatable control.
The problem is:
Well... There is a demo for populating datable with json from controller's method. It works.
http://gijgo.com/Grid/Demos/BasicAjaxCall
There is a demo for removing rows from a table populated with JSON directly. It works too.
http://gijgo.com/Grid/Methods/removeRow
But when I try to remove rows from table populated with JSON from controller, it doesn't seem to work.
http://gijgo.com/LiveEdit/Index/grid.Base.removeRow.sample.html
<html>
<head>
<meta charset="utf-8" />
<title>Example</title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<link href="/Areas/version_0_6/dist/modular/grid/css/grid.base.css" rel="stylesheet" type="text/css">
<script src="/Areas/version_0_6/dist/modular/grid/js/grid.base.js"></script>
</head>
<body>
<table id="grid"></table>
<script>
var grid;
function Delete(e) {
if (confirm('Are you sure?')) {
grid.removeRow(e.data.id);
}
}
grid = $('#grid').grid({
primaryKey: 'ID',
dataSource: '/version_0_6/Grid/GetPlayers',
columns: [
{ field: 'ID', width: 32 },
{ field: 'Name' },
{ field: 'PlaceOfBirth', title: 'Place Of Birth' },
{ title: '', width: 60, align: 'center', tmpl: 'Delete', events: { 'click': Delete } }
]
});
</script>
</body>
</html>
Am I doing something wrong?
Thank you very much!