Home Forums WPF controls Xceed DataGrid for WPF Bug with ItemsControl in ItemsControl?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #23933 |

    I have 2 problems.

    First, if you run the below code by uncommenting <xcdg:TableView />, you will get an exception indicating that TableView cannot be assigned by ItemsSource is in use.

    Second, if you keep that piece of the code uncommented but remove ItemsSource of DataGridControl instead, you won’t get any exception anymore. However, you will notice that only the first grid works correctly (i.e. showing column header) but not the others. It happens only you try to override FixedHeader template.

    All of these problems occur when DataGridControl lives inside other ItemsControl. Is it a bug? Is there a way to work around it?


    Title=”WindowsApplication4″ Height=”300″ Width=”300″
    <XmlDataProvider x:Key=”InventoryData” XPath=”Inventory/Books”>
    <Inventory xmlns=””>
    <Book ISBN=”0-7356-0562-9″ Stock=”in” Number=”9″>
    <Title>XML in Action</Title>
    <Summary>XML Web Technology</Summary>
    <Book ISBN=”0-7356-1370-2″ Stock=”in” Number=”8″>
    <Title>Programming Microsoft Windows With C#</Title>
    <Summary>C# Programming using the .NET Framework</Summary>
    <Book ISBN=”0-7356-1288-9″ Stock=”out” Number=”7″>
    <Title>Inside C#</Title>
    <Summary>C# Language Programming</Summary>
    <Book ISBN=”0-7356-1377-X” Stock=”in” Number=”5″>
    <Title>Introducing Microsoft .NET</Title>
    <Summary>Overview of .NET Technology</Summary>
    <Book ISBN=”0-7356-1448-2″ Stock=”out” Number=”4″>
    <Title>Microsoft C# Language Specifications</Title>
    <Summary>The C# language definition</Summary>
    <CD Stock=”in” Number=”3″>
    <Title>Classical Collection</Title>
    <Summary>Classical Music</Summary>
    <CD Stock=”out” Number=”9″>
    <Title>Jazz Collection</Title>
    <Summary>Jazz Music</Summary>
    Width=”400″ Height=”300″ Background=”Honeydew”>
    <Binding Source=”{StaticResource InventoryData}”
    XPath=”*[@Stock=’out’] | *[@Number>=8 or @Number=3]”/>

    <xcdg:DataGridControl AutoCreateColumns=”False”
    ItemsSource=”{Binding XPath=.}”>
    <xcdg:Column Title=”Title”
    DisplayMemberBinding=”{Binding XPath=Title}”/>

    <xcdg:Column Title=”Summary”
    DisplayMemberBinding=”{Binding XPath=Summary}”/>

    <!–<xcdg:TableView Theme=”RoyaleNormalColorTheme”
    ShowRowSelectorPane=”False” ShowFixedColumnSplitter=”False”>


    Imported from legacy forums. Posted by nat (had 614 views)

    Xceed Support
    Post count: 5658

    The problem comes from the fact that the TableView was not assigned to the View property of the DataGridControl but instead to the Default Content property (Items)

    You should enclose you TableViewDeclaration in:

    … put view declaration here

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2753 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.