Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: CollectionControl binding

$
0
0
Thanks.

I added
Private Sub CollectionControl1_ItemAdded(sender As Object, e As Xceed.Wpf.Toolkit.ItemEventArgs) Handles CollectionControl1.ItemAdded
        CollectionControl1.PersistChanges()
    End Sub


    Private Sub CollectionControl1_ItemDeleted(sender As Object, e As Xceed.Wpf.Toolkit.ItemEventArgs) Handles CollectionControl1.ItemDeleted
        CollectionControl1.PersistChanges()
    End Sub
and it works.
But what if my CollectionControl can be used to edit objects from different classes.
In this case I get the following error:

The value "<class2_object>" is not of type "<class1_object>" and cannot be used in this generic collection.

What's the best way of handling this situation?

Thanks for your speedy response.

Viewing all articles
Browse latest Browse all 4964


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>