I am answering to my own question: I created my own collection class and made it inherit from TrackedBindingList and implemented INotifyCollectionChanged. That took care of the issue.
Telerik OpenAccess. Using other type of collection instead of IList<T>
-
03-06-2022 - |
题
I created a class that inherits from ObservableCollection<T>
and wanted to use it instead of IList<T>
. When I modified the generator to generate ObservableCollection<T>
or MyCollectionClass<T>
(inherits ObservableCollection<T>
) it gives this error:
'MyCollectionClass' does not contain a definition for 'Customer' and no extension method 'Customer' accepting a first argument of type 'MyCollectionClass' could be found (are you missing a using directive or an assembly reference?)
Does anyone faced this problem before? Thanks for the help!
解决方案 3
其他提示
You can use TrackedBindingList
, however when you do that you have to provide data type of the collection items.
companies.HasAssociation<Customer>(c => c.Customer)
.WithOpposite(c => c.Company)
.HasConstraint((c,cc) => c.ID == cc.CustomerID);
不隶属于 StackOverflow