when I try to do this
in javascript
document.getElementById(<%=grid1.ClientID%>).height = 299 + px;
It does not change its height. Do I need to set the height of the frame too.
I have something like
<FrameStyle>
</FrameStyle> in the displaylayout area.
I am new using this grid. Can you please help me. if I need to set the frame height too, can you please tell me how to set it.
Thanks
Using document.getElementById() gets a reference to a single HTML element. WebGrid contains multiple HTML elements, in addition to other JavaScript objects. You should use the grid's Client-Side Object Model (CSOM) to maniuplate it whenever possible.
Taking a look at the CSOM Overview of WebGrid (link leads to the article in the online help documentation of NetAdvantage for .NET 2009 Volume 1), and looking at the "WebGrid Object" link, I see that there is a "resize()" function available. So, using the code you provided as a starting point, test the following instead:
var grid = igtbl_getGridById(<%=grid1.ClientID%>);grid.resize(desiredwidth, 299+px);