Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
570
UltraWebGrid's vertical scrollbar
posted

Why UltraWebGrid's vertical scrollbar didn't show when UltraWebGrid's height was over it that was I set UltraWebGrid's height.  I set UltraWebGrid's height by js.  The js code is below:

var h=document.documentElement.offsetHeight;

var uwg = igtbl_getGridById("UltraWebGrid1");

uwg.Element.style.height = (h-37)+"px";

Please help me, thanks

Parents
  • 1923
    Verified Answer
    posted

    Instead of modifying the dom element for the grid, try using the grid's own resize function which will likely resize all the parts of the grid correctly...

    // reference to the grid
    var uwg = igtbl_getGridById("UltraWebGrid1");

    // calculate the height
    var h = document.documentElement.offsetHeight - 37;

    // calculate the width etc...you can likely just get the same value from the grid
    var w = 500; // whatever...

    // resize
    uwg.resize(w,h); // call the grid's resize function (accepts numbers in pixels)...

    OR

    If that is all too hard or doesn't work...set the grid to 100% height and 100% width (may need some tweaking) and put it in a DIV that is relatively positioned...then just change the size of the DIV in pixels...the grid should then grow or shrink to fill the DIV...hope that makes sense...

Reply Children
No Data