this.Grid.BeginUpdate();
try
{
BindingSource bs = new BindingSource(ds, "MyTableName");
this.Grid.DataSource = bs;
}
finally
The grid takes a very long time to simply load up only about 100 rows that each might have 0 or more FK relationship to a second table. When I removed the foreign key relationship the speed was increased by more than 100x. I have read Mike's article on Grid performance (http://forums.infragistics.com/forums/t/15306.aspx). From the sample code up top you can see that I have tried wrapping my dataset around a binding source (Following this guide http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9280). Still the grid takes way too long to load. Any suggestions?
Does the DataSet have a recursive relationship? You may want to try setting the DisplayLayout.MaxBandDepth to something much smaller, like 5. There are performance issues with the currency managers when you get that deep, even when you use a BindingSource, and having 100 levels would easily slow it down by 100x or more.
-Matt
I don't think the DataSet has a recursive relationship but I have set the MaxBandDepth to 2 and the grid still takes forever to load.
Figured it out, the InitializeRow was generating the ValueList on every call. I lazyInit the valueList and it has solved the problem. Thank you Matt for your help.
No exceptions are being thrown while the dataset is being bound. I do have some events though:
The InitilizeRow adds a ValueList dropdown to one column.
Are any exceptions being thrown while loading the grid? You can turn on all exception by going to Debug -> Exceptions and clicking the 'Thrown' checkbox for "Common Language Runtime Exceptiosn. Are you doing any expensive processing in, for example, InitializeRow? How many columns do you have in the tables?