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
2334
Binding to generic IList
posted
I bind a grid to a List of custom data objects. That custom object has a property of type IList. I would expect this to show as a child band to the parent row but it shows as a column displaying the ToString of the instance: "System.ComponentModel.BindingList'1[string]"

If I change my property to be have return type of BindingList instead of IList the child bands show. Why does the child band not show when my property type is IList?

Thanks.
Parents
  • 469350
    Verified Answer
    Offline posted

    Is it a regular IList or a generic IList<>? The BindingManager in DotNet does not seem to recognize the generic IList<> as a valid list. You can use List<>, instead, though. Or BindingList<> is even better if you need to do more robust data modification like adding new rows. 

Reply Children