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
140
Issue with xamGrid and VS 2010
posted

Hi everyone,

I have an issue with xamGrid and VS2010. I've tried to define self-referenced hierarchy with hierarchical layout. It should look like this:

1. Group 1

    1.1. Subgroup 2

         1.1.1. Element 1

         1.1.2. Element 2

    1.2. Subgroup 2

         1.2.1. Element 1

2. Group 2

    2.1. Subgroup 3

         2.1.1. Element 3

         2.1.2. Element 4

    2.2. Subgroup 4

         2.2.1. Element 5

 

I've solved this part with Groups and Subgroups:

<ig:XamGrid Name="xamGrid1" AutoGenerateColumns="False" Grid.Column="1" ItemsSource="{Binding Path=FilteredActivityGroups}">

            <ig:XamGrid.ColumnLayouts>

                <ig:ColumnLayout Key="Subgroups" TargetTypeName="ActivityGroup">

                    <ig:ColumnLayout.Columns>

                        <ig:TextColumn Key="IDActivityGroup" />

                        <ig:TextColumn Key="GroupTerm" />

                        <ig:TextColumn Key="IDSuperGroup" />

                        <ig:TextColumn Key="Template" />                     

                    </ig:ColumnLayout.Columns>

                </ig:ColumnLayout>

            </ig:XamGrid.ColumnLayouts>

        </ig:XamGrid>        

 

And it works. Then I tried to add elements (activities in this case):

<ig:XamGrid Name="xamGrid1" AutoGenerateColumns="False" Grid.Column="1" ItemsSource="{Binding Path=FilteredActivityGroups}">            

            <ig:XamGrid.ColumnLayouts>

                <ig:ColumnLayout Key="Subgroups" TargetTypeName="ActivityGroup">

                    <ig:ColumnLayout.Columns>

                        <ig:TextColumn Key="IDActivityGroup" />

                        <ig:TextColumn Key="GroupTerm" />

                        <ig:TextColumn Key="IDSuperGroup" />

                        <ig:TextColumn Key="Template" />

                        <ig:ColumnLayout Key="Activities">

                            <ig:ColumnLayout.Columns>

                                <ig:TextColumn Key="IDActivity" />

                                <ig:TextColumn Key="ActivityTerm" />

                                <ig:TextColumn Key="ActivityTemplate" />

                                <ig:TextColumn Key="IDActivityGroup" />                           

                            </ig:ColumnLayout.Columns>

                        </ig:ColumnLayout>

                    </ig:ColumnLayout.Columns>

                </ig:ColumnLayout>             

            </ig:XamGrid.ColumnLayouts>

        </ig:XamGrid>        

 

This way, my VS2010 crashes with no message. All I have is "Not responding", and then crashes. When I comment this part:

                                <ig:TextColumn Key="IDActivity" />

                                <ig:TextColumn Key="ActivityTerm" />

                                <ig:TextColumn Key="ActivityTemplate" />

                                <ig:TextColumn Key="IDActivityGroup" /> 

 

I see my grid, and area where activities should be displayed, but with no data.

I've found post similar to this, could it be problem with collection? I've attached classes which I use for this hierarchy.

I need this kind of hierarchy, but it doesn't have to be this way. If it is possible with xamDataTree, or any other control, I would be happy to know. I'll accept any good advice.

 

Thank you.

 

- Lucky

classes.zip
Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    Thanks for the information. I was able to reproduce the issue, and it's a bug. Basically the xamGrid is getting caught in an infinite loop trying to figure out what level a ColumnLayout belongs to. 

    I"m going to write this up, and have you added to the bug so that you're notified when it fixed. 

    Thanks, 

    -SteveZ

Children