I have a custom list object that implements IBindingList and IEnumerable. If I set the datasource of a xamDataGrid to this object I can Read, Add, Edit, and Delete rows just fine.However, I attempted to set the datasource to a result of a Linq statement that joins the custom list to a DataTable, an example:
Dim linqResult = From table In myDataTable Join customData In myCustomList.ListItems On table.row_id Equals customData.row_id Select New With {table.id, customData.name} Distinct
This results in a grid in which I can only edit the fields whose data comes from the DataTable, but I can see the values in the fields from data that originated from the custom list object.
I then attempted to join two custom list objects using linq replacing the DataTable with a custom list object, and now none of the fields are editable.
Dim linqResult = From customData In myCustomList.ListItems Join customData2 In myOtherList.ListItems On customData.row_id Equals customData2.row_id Select New With {customData.id, customData2.name} Distinct
If I set the datasource of the grid to either of the custom data objects by themselves without linq those fields then become editable.
Any ideas?
Thank you
Hello dnapoleon518,
I am very glad that you have solved your issue. If you require any further assistance feel free to ask.
I ended up binding to complex properties as in this example: http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0/?page=xamDataPresenter_Displaying_a_Complex_Property_XAML.html