I have badly performing code that uses Ultragrid, but running a visualisation analysis using D3.js on the trace output I discovered that grid__InitializeRow was calling itself multiple times.
Trigger created by: this.grid.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(this.grid_InitializeRow);
Problem starts with this code:
column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true)
Searching the web I could not find information on this, but have found some possible contenders - calling any of these appears to call initialise row:
Questions
Thanks in advance
Found the answer via Infragistics forums :
Calling column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true)
triggers a rebind from the datasource, which in turn triggers initialise_row
.
As the resize was called multiple times (once per column per band) the rebinds got out of hand.
For information we also had the following problems. With a year's data it was taking 2 minutes to render:
Hope this helps others with simiar problems
I couldn't make "PerformAutoResize" perform adequately. It would take 10s of seconds. So in the end I decided to roll my own, which is limited to our particular use of the grid config which only displays text in cells (as opposed to sub-controls), using the Graphics.MeasureString function for each grid cell.
About 40 lines of code and reduced time taken to 0.4 secs for a 600 x 20 grid.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.