Hello
I have currently coded based on sample http://labs.infragistics.com/silverlight/lobsamples/2010.3/#/Samples/Grid/ColumnSettings/GridTemplateColumnLayout
Is it possible to have a grid in the DataTemplate?
Can I use Grid within to show the details
How would i refer to that grid
Ah,
Ok, i understand now.
However, the xamGrid needs an ItemsSource. so you won't be able to to bind it to a single row that doesn't belong to a collection.Unless you exposed another property on your data object, that would be a collection that contains 1 item, which would be itself.
Or, depending on how you want to display your data, you could simply use a horizontal ListBox, Grid panel, or event a StackPanel to display your other properties and have the bindings hard coded in the DataTemplate.
-SteveZ
I have multiple column and ColumnLayout is showing it one below the other
I just want extra columns of same row to be displayed in the expansion
Is that doable?
Hi,
Yes, you can specify the Columns in the nested xamGrid.
But you can also do the same with ColumnLayouts. Is there a reason you're not just using a ColumnLayouts? The xamGrid does support hiearchy.
So can I give
In original grid
<ig:TemplateColumnLayout Key="ID" Template="{StaticResource DataRowTemplate}" />
In expansion as
<DataTemplate x:Key="DataRowTemplate"> <ig:XamGrid ItemsSource="{Binding ID}"/>
</DataTemplate>
And can I give set of columns in the nested xamgrid that I need?
The xaml would look something like this:
<ig:XamGrid.Columns>
<ig:TemplateColumnLayout Key="Authors">
<ig:TemplateColumnLayout.Template>
<DataTemplate>
<ig:XamGrid Height="200" ItemsSource="{Binding Authors}"/>
</ig:TemplateColumnLayout.Template>
</ig:TemplateColumnLayout>
</ig:XamGrid.Columns>
Note: the DataContext is the row's Data.