Hi everybody,
some months ago I realized an UltraGridNavigator (you can find it in my files section). It worked fine until today, when I encountered a particular situation that make it to fail.
To react at any ColumnFilter changes, it listen to Property_changed in the following way:
void sourceGrid_PropertyChanged(object sender, Infragistics.Win.PropertyChangedEventArgs e) { PropChangeInfo columnFilterChangeInfo = e.ChangeInfo.FindPropId(Infragistics.Win.UltraWinGrid.PropertyIds.ColumnFilters); if (columnFilterChangeInfo != null) { //Do something } }
so the navigator could show a Filtered or NonFiltered status.
But what happen if DataSource is put to null?
In agreement with what Mike S. says here: http://news.infragistics.com/forums/p/8755/34465.aspxthe layout get reset. That's ok, and also filters get reset, that's absolutely consistent.
The only odd behavior which follow is that the property_changed relative to Infragistics.Win.UltraWinGrid.PropertyIds.ColumnFilters do not get fired !
Is this intentional? Why? How can I overcome of it?
Thank in advance.Gianni
Hi Mike,
yes, you are right, probably to notify every properties changes would be to many heavy. To trap the changing of DataSource property was my option already, but I'd wondered if any other solutions were possible so I asked.Thank you very much.
Gianni
Hi Gianni,
The grid only reports the property that was directly changed - in this case the DataSource.In the case of setting the DataSource, the whole Layout is thrown out and a new one establish. So it wouldn't make sense for the grid to fire a notification for every possible property change in a case like this. It would take a year just to fire all the events. :)
So I think fixing the issue here is simply a matter of trapping for the DataSource and DataMember properties, in addition to the ColumnFilters collection.