Home › Forums › WinForms controls › Xceed Grid for WinForms › Grid Performance!! (70 cols X 400 rows)
-
AuthorPosts
-
#15825 |
Hi.
I write the code in Form_Load event. But, scrolling is very slow.
—————————————————————————————
gridControl1.UIVirtualizationMode = UIVirtualizationMode.Cells;
for (int i = 0; i < 70; ++i)
{
gridControl1.Columns.Add(new Column(i.ToString()));
}gridControl1.BeginInit();
for (int i = 0; i < 400; ++i)
{
DataRow row = gridControl1.DataRows.AddNew();
for (int j = 0; j < 70; ++j)
{
row.Cells[j].Value = i + “,” + j;
}
}gridControl1.EndInit();
—————————————————————————————Is there the way smoothly scrolling???
Imported from legacy forums. Posted by Lim (had 3565 views)
When you set the <a href=”http://doc.xceedsoft.com/products/Xceedgrid/UI%20Virtualization.html”>UIVirtualizationMode</a> to Cells, it will reduce the loading time, but increase the scrolling time.
Imported from legacy forums. Posted by CharlesB (had 159 views)
Hi.
I set the UIVirtualizationMode to None, but scrolling is not smoothly.
How to make better scrolling?? (Thumbtracking Scroll)Imported from legacy forums. Posted by Lim (had 312 views)
I have the same problem. I bound the grid with a costum object collection (above 1200 items with 12 properties) and I really have bad performance when I scroll down.
I tried the UIVirtualizationMode solution and it doesn’t change anything.
I also have no event defined, so, I realy have no idea of what I can do to have better performance.
Imported from legacy forums. Posted by yvaillan (had 370 views)
I tried to reproduce your situation and the scrolling was quite good. To be sure also, did you test this in release mode (not just in debug)? It can make a big difference sometimes.
Here is the code I used for testing:
<code>
private void Form1_Load( object sender, EventArgs e )
{
gridControl1.DataSource = createDataTable(12, 1200);
}private DataTable createDataTable(int columnNumber, int rowNumber)
{
//Create a DataTable
DataTable dt = new DataTable();for( int j = 0; j < columnNumber; j++ )
{
DataColumn dcId = new DataColumn();
dcId.ColumnName = “Column” + j.ToString();
dcId.DataType = System.Type.GetType( “System.String” );
dt.Columns.Add( dcId );
}for( int i = 0; i < rowNumber; i++ )
{
System.Data.DataRow row = dt.NewRow();
foreach( System.Data.DataColumn col in dt.Columns )
{
row[ col.ColumnName ] = “Item ” + i.ToString();
}dt.Rows.Add( row );
}return dt;
}
</code>Imported from legacy forums. Posted by CharlesB (had 4582 views)
-
AuthorPosts
- You must be logged in to reply to this topic.