Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144758 | May 21,2019 11:35 AM UTC | May 30,2019 12:12 PM UTC | JavaScript - EJ 2 | 7 |
![]() |
Tags: Grid |
button = new ej.buttons.Button({});
button.appendTo('#normalbtn');
button.element.addEventListener("click", function(){
grid.dataSource = window.orderData.splice(4,4); // updated the dataSource of Grid
});
var grid = new ej.grids.Grid({
dataSource: window.orderData.splice(0,4),
………………………………………..
});
grid.appendTo('#Grid');
|
button = new ej.buttons.Button({});
button.appendTo('#normalbtn');
button.element.addEventListener("click", function(){
grid.refresh(); // to refresh the content
grid.refreshColumns(); // to refresh the refreshColumns
grid.refreshHeader(); // to refresh the header content
});
var grid = new ej.grids.Grid({
dataSource: window.orderData,
allowPaging: true,
columns: [
……………………………………..
],
pageSettings: { pageCount: 5 }
});
grid.appendTo('#Grid');
|
document.getElementById('EmptyDataSource').addEventListener('click', function(){
var gridObj = document.getElementById('Grid').ej2_instances[0];
var gridData = [];
gridObj.dataSource = gridData; // Binding empty dataSource to Grid
});
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.