Welcome to the Xceed Community | Help
Community Search  
More Search Options

BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

Sort Posts: Previous Next
  •  12-10-2009, 2:06 PM Post no. 25150

    Hmm [^o)] BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    Attachment: WpfPropertyDetail.zip

    I have bound a DataGrid to a BindingList property typed to a base type.  Within the 'get' accessor, I construct a BindingList with elements of a derived type and then return this BindingList using the LINQ extension method Cast() to cast it to the property's BindingList base type.  The reason I do this is so that I retain the binding to the same property, but show collections of different element types depending on the scenario.

    The bound data displays correctly in the grid as one would expect.  However, the Excel export doesn't export the correct data.  For the column of the derived class's property, it actually exports the base class's property value, even though this has already been exported to another column as it should be.  I have attached an example project demonstrating this behaviour.

    It seems to me that the type that the BindingList is typed to is having its properties iterated through using reflection when exporting the data rather than the type of each individual element, even though the type of each individual element is being used for the property count for iteration purposes during the reflection process.  Just a guess.

    Could this please be investigated?

    Thanks,

    Jason


    Associate, .NET Development
    Morgan Stanley, UK
  •  12-14-2009, 11:34 AM Post no. 25179 in reply to 25150

    Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    Hi Jason,

    After verification by a developer, this has been confirmed as a bug in the exporter. A fix request has been submitted (case id 129245). Thank you for bringing this to our attention.

     


    Diane Lafontaine
    Technical Support / Technical Support Team Lead
    Xceed Software Inc.
  •  02-01-2010, 6:52 PM Post no. 25606 in reply to 25179

    Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    What is the latest on this?  Has it been fixed yet?
    Associate, .NET Development
    Morgan Stanley, UK
  •  02-02-2010, 11:11 AM Post no. 25619 in reply to 25606

    Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    Hi Jason,

    I looked up the fix request ticket, and unfortunately it did not make the cut for the release of 3.6 and has been pushed to a future service release.

    Update 16-Feb-2010 :
    - the fix is ready to be implemented, it will be included in the next service release which should be in 2-3 weeks

     


    Diane Lafontaine
    Technical Support / Technical Support Team Lead
    Xceed Software Inc.
  •  02-24-2010, 7:13 AM Post no. 25909 in reply to 25619

    Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    Will this be a service release for version 3.6?  Any idea of a fixed date when this will be released yet?
    Associate, .NET Development
    Morgan Stanley, UK
  •  02-24-2010, 10:31 AM Post no. 25915 in reply to 25909

    Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    Hi Jason,

    The modifications have been made and the fix is ready to be included in the next service release (currently planned for 2nd week of March).

     


    Diane Lafontaine
    Technical Support / Technical Support Team Lead
    Xceed Software Inc.
  •  03-11-2010, 12:36 PM Post no. 26073 in reply to 25915

    Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    This issue is now fixed in the latest release, which can be downloaded in our Updates section here:

       http://xceed.com/pages/TopMenu/Downloads/Updates.aspx?Lang=EN-CA

     


    Diane Lafontaine
    Technical Support / Technical Support Team Lead
    Xceed Software Inc.
  •  03-11-2010, 12:44 PM Post no. 26076 in reply to 26073

    Yes [Y] Re: BindingList containing elements of derived type to a bound BindingList property's element type are not exported properly to Excel

    Thanks, already downloaded earlier today and tested, and was just about to post on this thread to update, and you beat me to it Smile

    Thanks for your support.

    Jason


    Associate, .NET Development
    Morgan Stanley, UK
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.