We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Performance problems with Style updates

Thread ID:

Created:

Updated:

Platform:

Replies:

34506 Sep 12,2005 12:53 AM UTC Sep 12,2005 09:02 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 12, 2005 12:53 AM UTC

I am running into some SEVERE performance problems on updateing the styles (Fonts, colors, etc) for a GridControl. Here is a snapshot of most of the offending code: this.syncFusionGrid.IgnoreReadOnly=true; this.syncFusionGrid.BeginUpdate(); foreach(int key in columnPrefs.Keys) { ColumnPreferences uP= ((ColumnPreferences)columnPrefs[key]); this.syncFusionGrid[0,(int)this.updateHandler.columnIndex[key]].CellValue=uP.Header; for(int i=1; i< this.syncFusionGrid.RowCount+1;i++) { //Nyumber format this.syncFusionGrid[i,(int)this.updateHandler.columnIndex[key]].Format=uP.NumberFormat; this.syncFusionGrid[i,(int)this.updateHandler.columnIndex[key]].CellValueType=typeof(double); //GridFont this.syncFusionGrid[i,(int)this.updateHandler.columnIndex[key]].TextColor=uP.GridFontColor; if(uP.GridFont!=null) this.syncFusionGrid[i,(int)this.updateHandler.columnIndex[key]].Font=new Syncfusion.Windows.Forms.Grid.GridFontInfo(uP.GridFont); if(uP.HeaderFont!=null) this.syncFusionGrid[0,(int)this.updateHandler.columnIndex[key]].Font=new Syncfusion.Windows.Forms.Grid.GridFontInfo(uP.HeaderFont); this.syncFusionGrid[0,(int)this.updateHandler.columnIndex[key]].TextColor=uP.HeaderFontColor; //justification if(uP.Justification==ColumnPreferences.JustifyEnum.Right) this.syncFusionGrid.ColStyles[(int)this.updateHandler.columnIndex[key]].HorizontalAlignment=Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Right; else if(uP.Justification==ColumnPreferences.JustifyEnum.Left) this.syncFusionGrid.ColStyles[(int)this.updateHandler.columnIndex[key]].HorizontalAlignment=Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Left; else this.syncFusionGrid.ColStyles[(int)this.updateHandler.columnIndex[key]].HorizontalAlignment=Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center; } this.syncFusionGrid.EndUpdate(); this.syncFusionGrid.IgnoreReadOnly=false;

Administrator [Syncfusion]
Replied On September 12, 2005 09:02 AM UTC


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;