I have a scenerio where I need to the selected records from one datagrid and set it in another. Both datagrids share the same datasource however I keep getting an error saying "Records must be valid records from display layout of the same dataPresenter". Any reason why?
Attached is a sample project to better explain.
Hello,
Thank you for your post and the attached sample application. I have been looking into the issue that you have described and the reason for the exception that you are getting is that you are trying to add a DataRecord object from one XamDataGrid, in the SelectedItems.Records of the other XamDataGrid. In order to add a Record in the SelectedItems.Records of a XamDataGrid, the Record should be created by the same XamDataGrid. What I can suggest is looping through the collection of the Records that should be selected and using the DataItem property of those records, create a new collection of the Records of the current XamDataGrid. I have modified the sample application that you have attached, in order show how you can implement this modification.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I am just checking if you require any further assistance on the matter.