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. Image for the cookie policy date

GridDataBoundGrid vs. MS DataGrid

Since we are porting our GUI app to syncfusion controls.. all our grid in old applications are build upon Datagrid that is binded to a typed dataset.. we ported our first screen to use GridDataBoundGrid and the performance is really not upto our satisfaction level when compared to MS DataGrid.. The screen is receives a continous update from a service so there is constant update happening to a dataset based on which view gets updated... GridDataBoundGrid is extremely slow... am i missing some configuration setting ? any switches i need to turn on to make it fast Regards Yogi

4 Replies

AD Administrator Syncfusion Team January 5, 2005 10:21 AM

If you are doing a lot of updates to your datatable, you might try calling grid.Binder.SuspendBinding followed by ResumeBinding around the code that is doing the update. This should prevent the grid from trying to individually respond to single update events. You can also use grid.BeginUpdate/grid.EndUpdate to avoid multiple repaints if you are doing s series of things that might force teh grid to redraw at each step. You should also take a look at this sample. Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\DataBound\GridPerf It shows comparisions of performance among several grids including a DataGrid. You can see how our GridDataBoundGrid is set up there for optimal performance.


AD Administrator Syncfusion Team January 5, 2005 10:40 AM

Thx Clay... will certainly look at the sample..


AD Administrator Syncfusion Team January 5, 2005 11:40 AM

Clay, As a first step towards optimization i turned on few options (as coded in gridperf sample app) symbolGrid.UseListChangedEvent=true; symbolGrid.ForceUpdateAfterListChangedEvent = true; symbolGrid.OptimizeInsertRemoveCells=true; I see following exception in my output window System.Data.VersionNotFoundException: There is no Original data to access. at System.Data.DataRow.GetOriginalRecordNo() at System.Data.DataRow.GetRecordFromVersion(DataRowVersion version) at System.Data.DataRow.get_Item(DataColumn column, DataRowVersion version) at System.Data.DataRowView.GetColumnValue(DataColumn column) at System.Data.DataColumnPropertyDescriptor.GetValue(Object component) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.QueryCellInfo(GridQueryCellInfoEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.Syncfusion.Windows.Forms.Grid.IGridModelDataProvider.QueryCellInfo(GridQueryCellInfoEventArgs e) at Syncfusion.Windows.Forms.Grid.GridModel.GetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style) at Syncfusion.Windows.Forms.Grid.GridControlBase.GetViewStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo) at Syncfusion.Windows.Forms.Grid.GridControlBase.GetPaintStyleInfo(Int32 rowIndex, Int32 colIndex, Boolean forceQueryCellInfo) at Syncfusion.Windows.Forms.Grid.GridPaint.InternalLoadCell(DrawStruct ds, Int32 rowIndex, Int32 colIndex) at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) catched at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) in :line 0 System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.GridPaint.InternalDrawBackground(DrawStruct ds, Int32 rowIndex, Int32 top, Int32 left, Int32 bottom, Int32 right) at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnDrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridPaint.DrawGrid(Graphics g, Boolean shouldClip, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) catched at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) in :line 0 Regards Yogesh S


AD Administrator Syncfusion Team January 5, 2005 12:39 PM

Are you using multiple threads? Can you modify our sample to show the problem so we can try to debug things?

Loader.
Live Chat Icon For mobile
Up arrow icon