Trying to change the height of my radgrid based on the client window size...Tried setting grid to 100%, but it's height is 0 while it is loading which looks weird so tried setting height to 600, then after the data is loaded, resizing on the client side to windowHeight-100px...Found old artice on your site from 2009 about grid.get_element().Style.height=xxx, but that code doesn't seem to work anymore...VS 2010 broke at that point...Below is my current Javascript...
This code gets called from the server after I call DataBind on the Radgrid. HELP???
<FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
>
<P>
function
</P></FONT>
<P></P></FONT>
<P></P></FONT>
<P><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
> resizeGrid()
{</FONT></FONT></P><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
>
var
</FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT
size=
"2"
face=
"Consolas"
> grid = $get(</FONT></FONT><FONT color=
"#800000"
size=
"2"
face=
"Consolas"
><FONT color=
"#800000"
size=
"2"
face=
"Consolas"
><FONT color=
"#800000"
size=
"2"
face=
"Consolas"
>"<%=radGridReports.ClientID
%>
"</FONT></FONT></FONT><FONT size="
2
" face="
Consolas
"><FONT size="
2
" face="
Consolas">);</FONT></FONT></P><FONT
size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
><FONT color=
"#0000ff"
size=
"2"
face=
"Consolas"
>
var
</FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT
size=
"2"
face=
"Consolas"
> gridHeight = window.screen.height -
100;</FONT></FONT></P><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
>
//grid.get_element().style.height = gridHeight +
"px"
;</FONT></FONT></FONT></P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
> </FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
>
//grid.clientHeight = gridHeight +
"px"
;</FONT></FONT></FONT></P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
> </FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
>
//grid.repaint();</FONT></FONT></FONT></P><FONT color="#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT
color=
"#006400"
size=
"2"
face=
"Consolas"
> </FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> grid.ClientSettings.Height = gridHeight + </P></FONT>
<P></P></FONT>
<P><FONT color=
"#800000"
size=
"2"
face=
"Consolas"
><FONT color=
"#800000"
size=
"2"
face=
"Consolas"
><FONT color=
"#800000"
size=
"2"
face=
"Consolas"
>
"px"
</FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT
size=
"2"
face=
"Consolas"
>;</FONT></FONT></P><FONT size=
"2"
face=
"Consolas"
><FONT
size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
>
//grid.get_element().style.height = gridHeight +
"px"
;</FONT></FONT></FONT></P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
> </FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P></FONT>
<P></P></FONT>
<P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
>
//grid.repaint();
</FONT></FONT></FONT></P><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT
color=
"#006400"
size=
"2"
face=
"Consolas"
><FONT color=
"#006400"
size=
"2"
face=
"Consolas"
>
</FONT></FONT></FONT><FONT size=
"2"
face=
"Consolas"
><FONT size=
"2"
face=
"Consolas"
>
<P> </P>
<P> }</P></FONT></FONT><BR><BR>