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
660
XamDataGrid Fields become non-editable when bound to Linq with Join
posted

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