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
746
2009 V2 Filtering works fine for root Fieldlayout, but not for any other field layout
posted

I can either add a filter condition to the filter collection or change the rowfilter on the underlying root dataview and filtering in the grid is immediately reflected.  If I instead use any other fieldlayout (e.g. index > 0), neither method filters out the child data.  Can you please advise on whether this is a problem in the grid, whether there is a workaround, or whether something needs to be done differently for child layouts?  Thanks in advance, as this is a huge problem for us.

THIS WORKS:

 

 

 

 

Infragistics.Windows.DataPresenter.

 

FieldLayout

oFieldLayout = XDG.FieldLayouts[0];

Infragistics.Windows.DataPresenter.

 

RecordFilterCollection

oRecordFilterColl = oFieldLayout.RecordFilters;

Infragistics.Windows.DataPresenter.

 

RecordFilter oRecordFilter = null

;

oRecordFilter =

 

new Infragistics.Windows.DataPresenter.RecordFilter(oFieldLayout.Fields["ID"

]);

oRecordFilter.Conditions.Add(

 

new Infragistics.Windows.Controls.ComparisonCondition(Infragistics.Windows.Controls.ComparisonOperator

.Equals, 1));

oRecordFilterColl.Add(oRecordFilter);

 

THIS DOES NOT:

 

 

 

 

Infragistics.Windows.DataPresenter.

 

FieldLayout

oFieldLayout = XDG.FieldLayouts[1];

Infragistics.Windows.DataPresenter.

 

RecordFilterCollection

oRecordFilterColl = oFieldLayout.RecordFilters;

Infragistics.Windows.DataPresenter.

 

RecordFilter oRecordFilter = null

;

oRecordFilter =

 

new Infragistics.Windows.DataPresenter.RecordFilter(oFieldLayout.Fields["ID"

]);

oRecordFilter.Conditions.Add(

 

new Infragistics.Windows.Controls.ComparisonCondition(Infragistics.Windows.Controls.ComparisonOperator

.Equals, 1));

oRecordFilterColl.Add(oRecordFilter);