Hi,
I have scheduler exist inside a div.
My requirement is that, when I resize the outside div or parent, scheduler should also get resize.
How can we achieve that…??
I have following code written which seems not working, This code get’s parents height and assign the new height to scheduler.
if(this.view.parentView)
{
var parentNode = this.view.parentView.dom;
var availHeight = parentNode.clientHeight; // slow, because it has to be computed the first time
var offsetTop = getAbsolutePos(this.dom, parentNode).top;
if(availHeight == 0) availHeight = getPixelValue(parentNode.style.height);
var newHeight = availHeight - offsetTop;
if(this.dom.parentNode != parentNode)
{
//BorderTopWidth is included in the offsetTop
var borderBottomWidth = $(this.dom.parentNode).css("borderBottomWidth");
if(borderBottomWidth)
{
borderBottomWidth = getPixelValue(borderBottomWidth);
if(borderBottomWidth > 0)
newHeight -= borderBottomWidth;
}
}
if(newHeight > 0)
{
this.dom.style.height = newHeight + "px"; // assigning value to scheduler.
}
}
else
{
this.dom.style.height = "100%";
}
- Niki