I have tried two separate projects so far, and every time I select an object created through the Linq to SQL designer as the datasource to my ultrawingrid Visual Studio becomes unresponsive using half my processor. This has happened on two separate machines, so I am reasonably certain that this is the grid. The other controls do not have an issue, only the ultragrid.
I'm using the 2008 volume 3 version. Is anyone else having this issue?
Thanks,
John Bailey
Linq to Sql and IG works great for me in a big project. Your problem is because you attached the whole table to the grid. Usually it is a design mistake. This thing can be very slow if your table is very big, but you can solve it by the VirtualMode feature (which I'm not really know much about).
Better thing to do, perform a query on the table which ends with ToArray that will really pull the data and put the array on the grid.
When you put the table as the data source, the data is being pulled only when the grid is trying to get it whet it loads on the form.
No, I haven't bound ANY data to the grid yet. The problem is in the designer, not at run time (which I thought I had stated clearly in the original post). At run time, I am using the paging features built into Linq to display the data which is a much better approach than converting the entire Linq query to an array. This works fine with the a regular gridview which is my fall back since the ultragrid doesn't make it past the design stage.
Another person gave me the solution. Apparently if the datasource has a many to many relationship, the grid will sit forever trying to step through all the dependant tables (cycling through them over and over). The solution was to change the MaxBandDepth property (under display properties) from its default of 100 to 1 (or another value that is more appropriate). You have to place the grid, cancel out of the designer, set the MaxBandDepth property, and then you can go back through the designer in order to set it up appropriately. Apparently, this can happen anytime your datasource has a many to many relationship.
MaxBandDepth really should be in step 1 in the designer to avoid this problem and the hoky workaround required to get around it.