Clear the content in the grid.
Parameters
Name | Type | Description |
---|---|---|
showNotFoundText | {boolean} | Indicates if the "Not Found" text is going to show after the clearing of the grid. |
Examples
sample
<button id="btnClear" class="gj-button-md">Clear</button>
<br/><br/>
<table id="grid"></table>
<script>
var grid = $('#grid').grid({
dataSource: '/Players/Get',
columns: [ { field: 'ID', width: 56 }, { field: 'Name' }, { field: 'PlaceOfBirth' } ],
pager: { limit: 5 }
});
$('#btnClear').on('click', function () {
grid.clear();
});
</script>