I am using XamWebGrid 10.1 and I want to have 3 different totals at the bottom of my screen, so I thought using the FooterTemplate would work best. I am setting a key on a TextColumn, but the 3 different totals are seperate items in my class. How would I bind the 3 TextBlock's or should I be using TemplateColumn? Is there a way to access My 3 totals from the footer?
public class Data
{
public Data LongExposure {get;set;}
public Data ShortExposure {get;set;}
public Data GrandTotal {get;set;}
public decimal? Exposure {get;set;}
}
<igGrid:TextColumn Key="Exposure">
<igGrid:TextColumn.FooterTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding}">
</StackPanel>
</DataTemplate>
</igGrid:TextColumn.FooterTemplate>
</igGrid:TextColumn>
Hi,
The only way to bind to something in the Footer, is via a StaticResource outside of the xamGrid, ad the Footers don't have a DataContext
So, if you stored your data in a ViewModel, that you can access via a StaticResource you can bind to it like so:
<TextBlock Text={Binding Source={StaticResource yourViewModel}, Path="LongExposure"}/>
-SteveZ