D
DanG
Hi all,
I fixed a column in my datagrid using the technique below. It works
fine with a small amount of data in the grid. But as the grid grows
either horizontally or vertically, everything slows down to where the
screen becomes unusable. Clicks, tabbing, browser-page scrolling, etc.
all take an excruciatingly long time. Removing the style makes the
screen process at a normal speed (though of course, without freezing
the column), so I know that's where the issue resides.
I was really just expecting that scrolling the DIV horizontally would
cause the Expression to recalculate for the fixed column, for only
those rows which are visible on the screen. But even making the DIV
very small has no affect on the slow screen speed. It's as though the
browser is working hard to deal with the ENTIRE grid, even though most
of it is hidden behind the DIV's "window".
So, what is the browser actually doing?? Why does this Style affect so
many aspects of the screen? Is there anything I can do to limit this
problem?
Questionably,
Dan
<style>
.FixedColumn { LEFT:
expression(document.getElementById("divDatagrid").scrollLeft);
POSITION: relative }
</style>
<div id="divDatagrid">
<asp:datagrid id="Datagrid1" runat="server" style="OVERFLOW:scroll;
Height:100; Width:400;">
<columns>
<asp:boundcolumn datafield="Field1" >
<headerstyle cssclass="FixedColumn"></headerstyle>
<itemstyle cssclass="FixedColumn"></itemstyle>
</asp:boundcolumn>
<asp:boundcolumn datafield="Field2" />
</columns>
</asp:datagrid>
</div>
I fixed a column in my datagrid using the technique below. It works
fine with a small amount of data in the grid. But as the grid grows
either horizontally or vertically, everything slows down to where the
screen becomes unusable. Clicks, tabbing, browser-page scrolling, etc.
all take an excruciatingly long time. Removing the style makes the
screen process at a normal speed (though of course, without freezing
the column), so I know that's where the issue resides.
I was really just expecting that scrolling the DIV horizontally would
cause the Expression to recalculate for the fixed column, for only
those rows which are visible on the screen. But even making the DIV
very small has no affect on the slow screen speed. It's as though the
browser is working hard to deal with the ENTIRE grid, even though most
of it is hidden behind the DIV's "window".
So, what is the browser actually doing?? Why does this Style affect so
many aspects of the screen? Is there anything I can do to limit this
problem?
Questionably,
Dan
<style>
.FixedColumn { LEFT:
expression(document.getElementById("divDatagrid").scrollLeft);
POSITION: relative }
</style>
<div id="divDatagrid">
<asp:datagrid id="Datagrid1" runat="server" style="OVERFLOW:scroll;
Height:100; Width:400;">
<columns>
<asp:boundcolumn datafield="Field1" >
<headerstyle cssclass="FixedColumn"></headerstyle>
<itemstyle cssclass="FixedColumn"></itemstyle>
</asp:boundcolumn>
<asp:boundcolumn datafield="Field2" />
</columns>
</asp:datagrid>
</div>