Bold BI®Unlock stunning dashboards with Bold BI®: 35+ widgets, 150+ data sources, AI agent & more. Try it for free!
Hi,
Is it possible to force my grid to show up to a max of 20 empty rows even if the datasource has less than 20 rows?
I am using ajax to populate the grid with data and sometimes, the number of rows are less than 20.
// Grid’s load event handler
function onLoad() {
var grid = document.getElementById('Grid').ej2_instances[0];
var dataLen = grid.dataSource.length;
while(dataLen < 20) {
// Condition executes when Grid data length is less that ‘20’
// Empty object is pushed to the Grid’s data source to render empty row
grid.dataSource.push({});
dataLen = grid.dataSource.length;
}
} |
Thank you. This is exactly what I was looking for