Hi, I'm a bit confused about the InitializeRow event. Am i righ to say that this InitializeRow event is fired whenever there is a change in any cell (either value, or appearance) of a row? Thanks.
Well, I can certainly see why that would be a problem. But I have no idea what's causing it. You should make sure you have the latest hot fix and if that doesn't hel, you should Submit an incident to Infragistics Developer Support
The only actual problem with it I'm having is the "null" rows. I simply put in a null check to make sure the values I'm checking aren't null to get around that, but I was mainly trying to figure out why the "null" rows were coming up to begin with. I would rather not have the "null" rows than have to code a workaround into the code.
I don't know what's up with the "null" rows. That sounds like it may be a bug.
But the other behavior you describe is correct. The rows will initialize when the grid thinks it needs to initialize. This may be because a value has changed or the row is scolled into view for the first time, or something in the data source changed.
Why is this a problem for you? This event is intended to allow you to color a row or perform some other operation on a row based on values in that row. It's not an event that you should use to do processor-intensive or performance-intensive operations.
I am having a similiar problem. I have a hierarchical grid and when I click a row (even if I'm not changing anything) random rows (I checked the data in e.Row) are being Initialized. Sometimes not even the row I clicked on. I have 189 rows with my sample and I can click a row and 5 random rows get initialized.
To make matters worse there is one set of sample data where it tries initializing "null" rows. All of the data in the row is showing up as System.DbNull, however, nowhere in the DataSource or displayed in the grid is there a single null or DbNull value. I'm using Infragistics v6.2 for a Windows app.
There's no way to suppress the InitializeRow event in that specific case. Why would you want to? If the value has not changed, then the code in InitializeRow will presumably not do anything.
There is a CellChange event on the grid that fires when the user types or otherwise modifies the value in a cell.
There's no event in the grid for specifically when the data in the data source changes. It doesn't make sense for the grid to have an event for this - the data source presumably has it's own events to notify you when something has changed, so you don't need the grid to act as an intermediary.