Hi,
We have a fairly large grid (10K records for top-level, 10K+ records for first child, potentially 50K+ for grand-children...). It's been working ok for years. Recently, we have had performance issue with those large amounts of data. We found out it was mainly due to how we conditionally format our rows. To make it much more efficient, we are doing both background evaluation of the business rules driving the formatting and only evaluating those rules on the visible rows.
Recently, we discovered that our child rows end up having an icon (or image?) of a lightning bolt embedded in each cell.
We do not set that icon that I can see in our code (there is way too much code needed to even show this grid that I cannot post anything here). Combing through our code, the only reference to that icon from our resources is for the tab in which this table exist (note the same icon as the icon for the tab in the upper left corner, next to incidents).
A few precisions here. Yes, those icons end up on ALL child rows (I am only showing 1 row here). We are currently using Infragistics 7.2 and are not planning on upgrading. It is very hard for us to test against a more recent version of Infragistics (hence our staying at 7.2)
We are not ready to file a bug for this yet or anything since we can't easily reproduce it in a stand-alone manner, however, we wanted to understand a bit better:
Thanks in advance for any help and advice.
Regards,
Eric.
eric_liprandi said:We do not set that icon that I can see in our code (there is way too much code needed to even show this grid that I cannot post anything here).
Brian,
Thanks for the quick reply. What object.Image am I looking for? Cell? Column? Appearance? Band? other? I use Resharper, so I can find those in a heartbeat.
Maybe I did not make this very clear earlier, but I am 99.99% sure we are not assigning that image to any of our band/column/cell. The only images we use are for ValueLists where some of our domain values have associated images (but none of them are that lightning bolt). I have a strong feeling we are doing something somewhat illegal with the grid that is causing this. At this point, what I am looking for, is a way to try to override this odd behavior (by setting the Image property to null?). Hence my follow-up question above.
Hi Eric,
The Image property Brian is referring to would be on an Appearance object. But the Appearance object is used in many places, so this could be an Appearance on a cell or a row.
Since the images here are only showing up on the child band, the obvious one to look at would be:
grid.DisplayLayout.Bands["child band key"].RowAppearance.Image
Regarding overriding this behavior by setting some Image to null, that will not work. The Image propety is null by default, so setting it to null will not do anything unless you have already set it to something other than null. So the only way to solve this issue to find out what appearance you are setting this image on and then remove it.
As Brian said, there is nothing in the grid that applies an image to a cell by default, so there absolutely must be something in your code doing this. The image is clearly coming from somewhere in your application, because you are applying it to the tab caption, as well.
I suppose it's also possible that the image is coming from an Application Style Library (isl) file. So you might want to search your code for a call to StyleManager.Load. This is very unlikely, though, because it's not easy to use an isl file to apply an appearance to a single band in the grid - isl's generally apply to the entire application.
Mike, Brian,
thanks for the help. Turns out we actually do set the image on an appearance. But in the previous code, it was only applied to the header row (so, showing that lightning bolt in the header row). It was down in a very awkward way that escaped our code reviews.
We have now fixed it and everything works beautifully. Next step: upgrade to the latest 2010.x...