Hi, I'm using DataPresenter in my WPF application. In that same application i'm using xamlChart. I passing the same dataview to both the controls as datasourceWhen the user did the filter in xamldatapresenter, how to get that filtered data and refresh the xamlchart in the application. Can i get the filtered data in RecordFilterChanged or Changing event ? If yes can you provide the sample code for that . Thanks in advance
Hello,
The Records in the XamDataGrid are actually a collection and the method can only return an IEnumerable<DataRecord> collection. However it contains all the data you would need to create a DataView out of them. It shouldn’t be at all difficult. Nevertheless let me know if you need any help along the way.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Thanks Peter,
Can i get the filtered data in dataview in RecordFilterChanged event ? Can you give a example regarding the filtered data in data view in RecordFilterChanged ?
Thanks
I have been looking into your requirement and the XamDataGrid has exposed methods just for that, that you can use right away:
xamDataGrid1.RecordManager.GetFilteredInDataRecords();
xamDataGrid1.RecordManager.GetFilteredOutDataRecords();
I suppose you are going to need the Records’ underlying data class objects in order to use in the chart. You can get them by casting the Record class to DataRecord and access its DataItem property.
Please let me know if you require any further assistance on the matter.