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
15
Put XamTreeGrid in XamTabControl
posted

Hello, 

I'd like to put a XamTreeGrid in XamTabContol. 

I wrote this code, and the Name and subNode's rows are shown with branch lines.

However, I cannot see the subNode's strings.

How can I fix it? 

<ig:XamTabControl>
    <ig:TabItemEx>
        <ig:XamTreeGrid DataSource={Binding TreeItemList}>
            <ig:XamTreeGrid.FieldLayouts>
                <ig:FieldLayout Key="TreeItemClass">
                    <ig:TextField Name="Name" />
                    <ig:Field Name="SubnodeItemList"/>
                </ig:FieldLayout>
            </ig:XamTreeGrid.FieldLayouts>
        </ig:XamTreeGrid>
    <ig:TabItemEx>
<ig:XamTabControl>

public class TreeItem Class
{
    public string Name { get; set; }
    public ObservableCollection<string> SubnodeItemList { get; set; }
    
    public TreeItemClass()
    {
        SubnodeItemList = new ObservableCollection<string>();
    }
}

public class ViewModel
{
    public ObservableCollection<TreeItemClass> TreeItemList { get; set; }
    
    public ViewModel()
    {
        TreeItemList = DataList;
    }
}