AD
Administrator
Syncfusion Team
January 5, 2005 03:21 PM UTC
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 04:40 PM UTC
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