A way to dynamically resize the datagrid's frame height?

Discussion in 'ASP .Net Datagrid Control' started by kingflux, Apr 7, 2007.

  1. kingflux

    kingflux Guest

    We are using the Microsoft DataGrid control provided in ASP.NET 1.1.

    Is there any way to make the datagrid's frame taller after the HTML is
    rendered in the browser?

    The original height is set in styles.css:

    .ScrollingGrid
    {
    overflow: auto;
    border: #00125a thin solid;
    height: 400px;
    }

    and is fine for 1024x768, but looks too small when larger resolutions
    are in use.

    I've added an icon whose onclick javascript should increase the grid's
    height:

    onclick="dg=getElementById('datagrid1'); datagrid1.height='675px';"

    Nothing happens.

    Have tried various combinations of syntax on these attributes, all to
    no avail:

    datagrid1.height
    datagrid1.scrollheight
    datagrid1.clientheight
    datagrid1.style.pixelHeight


    When I use a custom function to display the current properties:

    datagrid1.height is reported as a null value
    datagrid1.width is reported as a null value
    datagrid1.scrollheight is 3069
    datagrid1.clientheight is 3069
    datagrid1.style is reported as an [object]
    --> How to look at the sub-attributes? I tried datagrid1.style[1]
    and several variations, to no avail.

    Thank you in advance!

    -Tim
     
    kingflux, Apr 7, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wladimir Borsov
    Replies:
    7
    Views:
    21,586
    eswar
    Apr 20, 2012
  2. SRuby

    How to resize row height?

    SRuby, Oct 12, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    144
    SRuby
    Oct 12, 2005
  3. Replies:
    2
    Views:
    1,291
    Adrienne
    Feb 13, 2005
  4. Replies:
    1
    Views:
    209
  5. Teelions

    dynamically resize layer height

    Teelions, Jan 22, 2007, in forum: Javascript
    Replies:
    1
    Views:
    194
    Jeff North
    Jan 22, 2007
Loading...

Share This Page