Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1149
Put datasource to null
posted

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.aspx
the 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

 

Parents
  • 469350
    Offline posted

    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.

Reply Children
No Data