Hi,
We're currently encountering an issue where we get a "Add value to collection of type 'Infragistics.Windows.DataPresenter.DataPresenterBase+DataItemsCollection' threw an exception.'" exception whenever the application is launched.
Additionally, we get a "Can't add items to a DataPresenter that is bound to a DataSource". I don't think we're trying to add items, I only want to present the items from the collection in a certain way, my understanding is that Field Labels was the way to achieve this. This only occurs when we set AutoGenerateFields = False and specify a set of fields in the FieldLayout. I've attached a sample project showing this behavior.
Hello Darlene,
I am very glad that my suggestion was helpful for you. Please let me know if you need any further assistance on the matter.
Your suggestion resolved the problem, thank you!
I am just checking your progress on the issue that you are having.
If you require any further assistance please do not hesitate to ask.
Thank you for your post.
I have been looking into the code snippet that you have provided. It seems that the exception comes from the declaration of FieldLayout. You should put the FieldLayout between IgDP:XamDataGrid.FieldLayouts tags. I modified your sample application as I implemented this approach and works.
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
.......
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
Please let me know if you need any further assistance on this matter.