M
_MC_
Hi, that's my Problem:
recently I had to set some columns in our Datagrid invisible. As we
use an dynamic Datagrid Binding, the only possible method is in
ItemDataBound Event:
protected void DataGrid1_ItemDataBound(object sender,
DataGridItemEventArgs e)
{
for(int i=1; i <= 2; i++)
e.Item.Cells.Visible = false;
}
However, this part of code increases cpu load on server (for one
table
about 20 sec 100% CPU Load on Athlon 64 3800+) .
This time depends on no obvisious factor, e. g. 3 or 1000 Rows, the
time is always about 20 sec. The Trace indicates, that function
"DataGrid1_ItemDataBound" is called about 31 times.
Any ideas how we could handle this inacceptable performance lag?
(Change to static datagrid will be one idea, we know, is there however
any change to stay by dynamic datagrid bound without performance lags
in this count?)
Thanks a lot,
Steefan
recently I had to set some columns in our Datagrid invisible. As we
use an dynamic Datagrid Binding, the only possible method is in
ItemDataBound Event:
protected void DataGrid1_ItemDataBound(object sender,
DataGridItemEventArgs e)
{
for(int i=1; i <= 2; i++)
e.Item.Cells.Visible = false;
}
However, this part of code increases cpu load on server (for one
table
about 20 sec 100% CPU Load on Athlon 64 3800+) .
This time depends on no obvisious factor, e. g. 3 or 1000 Rows, the
time is always about 20 sec. The Trace indicates, that function
"DataGrid1_ItemDataBound" is called about 31 times.
Any ideas how we could handle this inacceptable performance lag?
(Change to static datagrid will be one idea, we know, is there however
any change to stay by dynamic datagrid bound without performance lags
in this count?)
Thanks a lot,
Steefan