I have a Task class that look like this:
public class Task{ public ObservableCollection<Task>SubTasks { get; set; } public string Description { get; set; } public string User { get; set; } public bool IsSelected { get; set; }}
I'm setting the ItemsSource property on my grid to an instance of an ObservableCollection<Task> and expect to see the whole hierachy in the grid.
According to the documentation it should work if I define my xaml like this:
<igGrid:XamWebGrid x:Name="TaskGrid" AutoGenerateColumns="False" ItemsSource="{Binding Tasks}"><igGrid:XamWebGrid.ColumnLayouts> <igGrid:ColumnLayout Key="somekey" TargetTypeName="Task"> <igGrid:ColumnLayout.Columns> <igGrid:TextColumn Key="Description" /> <igGrid:TextColumn Key="User" /> <igGrid:CheckBoxColumn Key="IsSelected" /> </igGrid:ColumnLayout.Columns> </igGrid:ColumnLayout></igGrid:XamWebGrid.ColumnLayouts></igGrid:XamWebGrid>
The documentation I'm refering to is the last section at http://help.infragistics.com/NetAdvantage/Silverlight/2009.2/CLR3.5/
Problem is that this blows up with a StackOverflowException as soon as I set the data source on the grid.
There must be something missing in this sample, but I can't figure it out. Setting MaxDepth doesn't help either (but I wouldn't expect 3 levels to be too much for it anyway).
The sample in the documentation refers to some Employee data source but I can't find any code for that anywhere.
Ok, thanks for that.
I did some more testing with this and discovered an interesting thing: If I skip the binding and manually set the ItemsSource in the UserControl.Load event , then it works fine. If I set it any point earlier than that or use a binding it blows up with a StackOverflowException.
Hello,
I think I see what the issue is. I am going to ask our Developer Support staff to open you a support ticket so this can be tracked and you can be notified when a resolution is reached.