Element is already the child of another element in nested GridView

2 posts, 0 answers
  1. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 26 May 2010 Link to this post

    Hi all.

    I have a gridview that then links to a second set of entities that is the detail. In the detail grid I can return the column values however when I tryto place a combo box in here I receive the following error "Element is already the child of another element."

    In the sub details I have a column called "roleguid" this is then linked another table on the column "rowguid". Basically the sub table is a table that holds the guids of the roles the template belongs to, I am then linking this in the combo box so that the role description can be shown. If I use a textbox I can see the value of "roleguid" in the details nested view however adding the combo boxes causes the error.

    <telerik:RadGridView.HierarchyChildTemplate> 
                                    <DataTemplate> 
                                        <telerik:RadGridView x:Name="radGridView1" CanUserFreezeColumns="False" AutoGenerateColumns="False"   
                                                             ItemsSource="{Binding DOC_TYPES_ROLES}"  ShowGroupPanel="False" IsReadOnly="True">  
                                            <telerik:RadGridView.Columns> 
                                                <!--<telerik:GridViewDataColumn DataMemberBinding="{Binding roleguid}" Header="Guid" />--> 
                                                <telerik:GridViewComboBoxColumn Header="Type" 
                                                                ItemsSourceBinding="{Binding Data, Source={StaticResource ddsRoles}}" 
                                                                DataMemberBinding="{Binding templateid}"   
                                                                DisplayMemberPath="roletext"   
                                                                SelectedValueMemberPath="roleguid" /> 
                                            </telerik:RadGridView.Columns> 
                                        </telerik:RadGridView> 
                                    </DataTemplate> 
                                </telerik:RadGridView.HierarchyChildTemplate> 
     

  2. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 26 May 2010 Link to this post

    Sorted it now, the problem was in my binding of the combo-box, still getting my head around the binding aspects ! Thanks in advance;
  3. DevCraft banner
Back to Top