Hi,
We create the grid and fill it with data dynamically at the page startup.
We first create a div like that:
then we set the height:
then set all other parameters (datasource, column,...). After initialising the grid:
The gird height do not fill all the container DIV height. If I use paging or filter, sorting, the grid reseized and fill the container DIV
I try to call this function after initialisation:
This function work perfectly if I set a breakpoint before calling it. The grid resized and fill the container DIV. But if I let the code run normally, I got the same problem like if the function was called too erlied.
Any suggestion?
We create the grid and fill it with data dynamically at the page startup.
We first create a div like that:
$grid = $("<
div
></
div
>");
$grid.filter(
'div'
).css(
"height"
,
'300px'
)
$grid.kendoGrid({});
I try to call this function after initialisation:
ConstV7.prototype.resizeGrid =
function
(grid) {
var
gridElement = grid,
dataArea = gridElement.find(
".k-grid-content"
),
gridHeight = gridElement.innerHeight(),
otherElements = gridElement.children().not(
".k-grid-content"
),
otherElementsHeight = 0;
otherElements.each(
function
() {
otherElementsHeight += $(
this
).outerHeight();
});
dataArea.height(gridHeight - otherElementsHeight);
}
This function work perfectly if I set a breakpoint before calling it. The grid resized and fill the container DIV. But if I let the code run normally, I got the same problem like if the function was called too erlied.
Any suggestion?