DataGrid Unknown Type

Posted by: justin-hargraveparadedirect-co-uk on 19 September 2017, 11:10 am EST

    • Post Options:
    • Link

    Posted 19 September 2017, 11:10 am EST

    Hi,

    Hit a little problem whilst parsing XAML from a database. The element contains a number of controls which all load and display fine - until I drop in a DataGrid (or FlexGrid) at which point it errors with the following.

    Cannot create unknown type '{http://schemas.componentone.com/winfx/2006/xaml}C1DataGrid'.'
    

    My header section for the element contains the following,

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    

    If I copy the element (with DataGrid) directly into the target window of the application it displays and executes fine; only appearing to error when I parse from a string.

    Unfortunately I have to load the XAML from a database as the application requires a variety of layouts.

    I am using the controls from the Demo download. Perhaps related?

    Thank you.

  • Posted 19 September 2017, 11:10 am EST

    Hello Justin,

    I can understand your issue but this seems to be an custom implementation issue and it is quite difficult for me to comment out on your issue without replicating the same.

    Could you please share a stripped down sample replicating the issue along with the steps to reproduce so that I can debug the exact issue and can assist you accordingly.

    Regards,

    Prashant

  • Posted 11 May 2018, 2:43 pm EST

    You might need to follow the advice from here:

    https://stackoverflow.com/questions/6772414/can-xamlreader-load-xaml-that-contains-types-defined-in-external-assemblies

    If you Assembly.LoadFrom(…) the ComponentOne assemblies before calling XamlReader.Parse, you may have more success.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels