DataGrid ItemDataBound Performance Lag Weitere Optionen

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
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top