or
function
resizeGrid(h) {
var
gridElement = $(
"#grid"
),
dataArea = gridElement.find(
".k-grid-content"
),
gridHeight = h,
otherElements = gridElement.children().not(
".k-grid-content"
),
otherElementsHeight = 0;
otherElements.each(
function
() {
otherElementsHeight += $(
this
).outerHeight();
});
dataArea.height(gridHeight - otherElementsHeight);
}
It is based on a fiddle that Dimo posted in another thread. The h parameter is the height of the div that contains the grid.
The problem is that when the page is first loaded the grid causes a scrollbar to appear. If I then resize the browser or maximize the grid appears as it should. How can I get it set to the correct height on first load?
I have attached two images one showing the grid as it appears on load and one after any resize or maximze etc...
$(
".list-item"
).each(
function
(){
$(
this
).kendoDraggable({
group:
"ihopethisworks"
});
});
<
div
id
=
"glass"
class
=
"glass"
style
=
"display: none;"
></
div
>
.glass {
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
z-index
:
100
;
opacity:
0.3
;
background
:
#fff
;
}
function
showLoading() {
$(
"#glass"
).show();
app.showLoading();
}