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

K

kingflux

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top