Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
6547 | Aug 15,2003 10:23 PM UTC | Aug 18,2003 05:47 AM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
grid.DataSource = null;
grid.Model.ColCount = 0;
What version of our code base are you using? In 1.6.1.0, with the above line added, I modified your sample by adding another label and displaying the ticks taken to do the 100 updates, and 1000 attaches/detaches.
I saw no noticeable difference between doing the 100 update after the single binding, or after the 1000 bindings. The updating was probably 1/4 to 1/3 slower the the DataGrid update, but I think that is due to the drawing infrastructure that allows for drawing any font in any cell with any color and any border (etc) that the Syncfusion grid's supports and the DataGrid does not support. In fact, when you suspend the drawing during the updating, only drawing after the last update, the GridDataBoundGrid is 1/3 faster than the DataGrid. And this was true whether it was on the first binding or 1001 binding.
Below is one of your button handler's showing commented suspend drawing code.
Does adding ColCount = 0 resolve the problem as you see it?
private void button4_Click(object sender, System.EventArgs e) { this.label3.Text = ""; //grid.BeginUpdate(); int ticks = Environment.TickCount; chkMode.Enabled = false; for (int i=0; i < 100; i++) { Debug.WriteLine(i.ToString()); m_DS.Tables["T1"].Rows[0]["C1"] = i.ToString(); } //grid.Model.EndUpdate(); //grid.Refresh(); this.label3.Text = (Environment.TickCount - ticks).ToString() + " ticks"; }
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.
This page will automatically be redirected to the sign-in page in 10 seconds.