Hi, im trying to use GetFilteredInNonGroupByRows in WPF, but its dont work.
I have a xamdatagrid, and i try do something like that:
<igWPF:XamDataGrid GetFilteredInNonGroupByRows="{Binding Visiblerows}" />
But it dont work, and i need do it for a MVVM pattern, any idea?
Greetings
Hello Ernesto,
I am unsure where you are getting the "GetFilteredInNonGroupByRows" method in this case, but the XAML code that you have provided will not work in this case, and as far as I am aware, it is not possible to invoke a method from XAML either.
I see that you have posted on another forum thread here that recommends usage of the ViewableRecords collection of the XamDataGrid for this. There is no bind-able property on the XamDataGrid that will allow you to bind the ViewableRecords and this property is not bind-able, but following the other forum thread, you can write a System.Windows.Interactivity.Behavior<XamDataGrid> that handles the Loaded event in an MVVM way, and then hooks into the XamDataGrid.ViewableRecords.CollectionChanged event.
From there, you can get your ViewModel from your grid that the behavior is attached to using the Behavior.AssociatedObject property, and if you have a property of the type ViewableRecordCollection on your ViewModel, you can set it to be the XamDataGrid.ViewableRecords collection. This will essentially bind the filtered in data records to the grid.
I am attaching a sample project to demonstrate the above. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
1263.XDGBindFilteredItemsCase.zip