I'm trying to figure out how to add multiple header rows. Date, Count & amount are the only headers w/ values associated, I just need to associate count and amount to the actual value they're representing. The user would like a silver break between the different sets of data too. This is one flat datasource for the entire grid; credits and debits are columns in the same table.
Thanks for your help!
Thanks for posting your sample J. I was trying to do two-line column headers yesterday and couldn't figure out how to do it.
Kathy
I have come up w/ a work around solution after working w/ the support center to determine that my request has been submitted as a possible feature request.After many, MANY hours of searching these forums I have pieced together a work around solution that has hard coded column sizes that are not expandable. I hope this helps someone save a lot of searching for a solution to their similar problem!
Please view the attached image to see a preview of the final output...
<ScrollViewer Name="DailyDetailScrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="25"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="75" />
<ColumnDefinition Width="160" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="230" />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<TextBlock Background="LightGray" x:Name="textBlockCreditDebitsTitle" Text="Daily Detail" Grid.Row="0" Grid.ColumnSpan="26" Style="{StaticResource styleTextBlockTitle}" />
<Label Background="LightGray" Grid.Row="1" Grid.Column="0" Grid.RowSpan="2"/>
<Label Background="CornflowerBlue" Content="CREDITS" FontWeight="Bold" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="10"/>
<Label Background="LightGray" Content="Cash (& Combined Dep)" Grid.Row="2" Grid.Column="1"/>
<Label Background="LightGray" Content="Checks Only" Grid.Row="2" Grid.Column="2"/>
<Label Background="LightGray" Content="Lockbox" Grid.Row="2" Grid.Column="3"/>
<Label Background="LightGray" Content="Wires" Grid.Row="2" Grid.Column="4"/>
<Label Background="LightGray" Content="ACH Non-CC" Grid.Row="2" Grid.Column="5"/>
<Label Background="LightGray" Content="ACH CC" Grid.Row="2" Grid.Column="6"/>
<Label Background="LightGray" Content="Bank Adjustments" Grid.Row="2" Grid.Column="7"/>
<Label Background="LightGray" Content="Other" Grid.Row="2" Grid.Column="8"/>
<Label Background="LightGray" Content="Credit ZBA" Grid.Row="2" Grid.Column="9"/>
<Label Background="LightGray" Content="Total CREDITS" Grid.Row="2" Grid.Column="10"/>
<Label Background="LightGray" Grid.Row="1" Grid.RowSpan="2" Grid.Column="11"/>
<Label Content="DEBITS" Background="Orange" FontWeight="Bold" Grid.Row="1" Grid.Column="12" Grid.ColumnSpan="10"/>
<Label Background="LightGray" Content="Bank Orders" Grid.Row="2" Grid.Column="12"/>
<Label Background="LightGray" Content="Wires" Grid.Row="2" Grid.Column="13"/>
<Label Background="LightGray" Content="ACH Non-CC" Grid.Row="2" Grid.Column="14"/>
<Label Background="LightGray" Content="ACH CC" Grid.Row="2" Grid.Column="15"/>
<Label Background="LightGray" Content="Bank Adjustments" Grid.Row="2" Grid.Column="16"/>
<Label Background="LightGray" Content="Returned Checks" Grid.Row="2" Grid.Column="17"/>
<Label Background="LightGray" Content="Bank Fees" Grid.Row="2" Grid.Column="18"/>
<Label Background="LightGray" Content="Other" Grid.Row="2" Grid.Column="19"/>
<Label Background="LightGray" Content="Debit ZBA" Grid.Row="2" Grid.Column="20"/>
<Label Background="LightGray" Content="Total DEBITS" Grid.Row="2" Grid.Column="21"/>
<Label Background="LightGray" Grid.Row="1" Grid.RowSpan="2" Grid.Column="22"/>
<Label Background="LightGray" Content="TOTAL" FontWeight="Bold" Grid.Row="1" Grid.Column="23" Grid.RowSpan="2"/>
<Label Background="LightGray" Content="COMMISSION" FontWeight="Bold" Grid.Row="1" Grid.Column="24" Grid.ColumnSpan="2" />
<Label Background="LightGray" FontWeight="Bold" Grid.Row="2" Grid.Column="24" Grid.ColumnSpan="2" />
<igDP:XamDataGrid Name="dgCreditsDebits" Theme="Wind" Background="White" Grid.Row="3" Grid.ColumnSpan="25" CellUpdated="dgCreditsDebits_CellUpdated">
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="Date" Label="Date">
<igDP:Field.Settings >
<igDP:FieldSettings AllowEdit="False" />
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="CashAndCombinedDepCount" Label="Count"/>
<igDP:Field Name="CashAndCombinedDepAmount" Label="Amount"/>
<igDP:Field Name="ChecksOnlyCount" Label="Count"/>
<igDP:Field Name="ChecksOnlyAmount" Label="Amount"/>
<igDP:Field Name="LockBoxCount" Label="Count"/>
<igDP:Field Name="LockBoxAmount" Label="Amount"/>
<igDP:Field Name="WiresCountCredits" Label="Count"/>
<igDP:Field Name="WiresAmountCredits" Label="Amount"/>
<igDP:Field Name="ACHNonCCCountCredits" Label="Count"/>
<igDP:Field Name="ACHNonCCAmountCredits" Label="Amount"/>
<igDP:Field Name="ACHCCCountCredits" Label="Count"/>
<igDP:Field Name="ACHCCAmountCredits" Label="Amount"/>
<igDP:Field Name="TotalCountAdjCredits" Label="Count"/>
<igDP:Field Name="TotalAmountAdjCredits" Label="Amount"/>
<igDP:Field Name="OtherCountCredits" Label="Count"/>
<igDP:Field Name="OtherAmountCredits" Label="Amount"/>
<igDP:Field Name="CreditZBACount" Label="Count"/>
<igDP:Field Name="CreditZBAAmount" Label="Amount"/>
<igDP:Field Name="TotalCountCredits" Label="Count">
<igDP:Field Name="TotalAmountCredits" Label="Amount">
<igDP:UnboundField Name="b1" Label="{x:Null}">
<igDP:UnboundField.Settings>
<igDP:FieldSettings AllowEdit="False" FocusManager.IsFocusScope="False">
<igDP:FieldSettings.CellValuePresenterStyle>
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="Background" Value="LightGray"/>
</Style>
</igDP:FieldSettings.CellValuePresenterStyle>
</igDP:FieldSettings>
</igDP:UnboundField.Settings>
</igDP:UnboundField>
<igDP:Field Name="BankOrdersCount" Label="Count"/>
<igDP:Field Name="BankOrdersAmount" Label="Amount"/>
<igDP:Field Name="WiresCountDebits" Label="Count"/>
<igDP:Field Name="WiresAmountDebits" Label="Amount"/>
<igDP:Field Name="ACHNonCCCountDebits" Label="Count"/>
<igDP:Field Name="ACHNonCCAmountDebits" Label="Amount"/>
<igDP:Field Name="ACHCCCountDebits" Label="Count"/>
<igDP:Field Name="ACHCCAmountDebits" Label="Amount"/>
<igDP:Field Name="TotalCountAdjDebits" Label="Count"/>
<igDP:Field Name="TotalAmountAdjDebits" Label="Amount"/>
<igDP:Field Name="ReturnedChecksCount" Label="Count"/>
<igDP:Field Name="ReturnedChecksAmount" Label="Amount"/>
<igDP:Field Name="BankFeesCount" Label="Count"/>
<igDP:Field Name="BankFeesAmount" Label="Amount"/>
<igDP:Field Name="OtherCountDebits" Label="Count"/>
<igDP:Field Name="OtherAmountDebits" Label="Amount"/>
<igDP:Field Name="DebitZBACount" Label="Count"/>
<igDP:Field Name="DebitZBAAmount" Label="Amount"/>
<igDP:Field Name="TotalCountDebits" Label="Count">
<igDP:Field Name="TotalAmountDebits" Label="Amount">
<igDP:UnboundField Name="b2" Label="{x:Null}">
<igDP:Field Name="TotalCountCreditsAndDebtis" Label="Count">
<igDP:Field Name="TotalAmountCreditsAndDebtis" Label="Amount">
<igDP:Field Name="TotalCommissionCreditsAndDebits" Label="">
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings SelectionTypeRecord="Single" AutoGenerateFields="False" RecordSelectorLocation="None" AllowFieldMoving="No" >
<igDP:FieldLayoutSettings.DataRecordCellAreaGridTemplate>
<ItemsPanelTemplate>
<ColumnDefinition Width="70" />
<ColumnDefinition Width="90" />
<ColumnDefinition Width="100" />
<ColumnDefinition Width="130" />
</Grid>
</ItemsPanelTemplate>
</igDP:FieldLayoutSettings.DataRecordCellAreaGridTemplate>
</igDP:FieldLayoutSettings>
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.Resources>
<Style TargetType="{x:Type igDP:RecordListControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:RecordListControl}">
<ScrollViewer Margin="0, 0, -20, 0" CanContentScroll="True" Focusable="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<ItemsPresenter/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</igDP:XamDataGrid.Resources>
</igDP:XamDataGrid>
So basically you want it to look like what you had in your first post.
The silver table break bit is, I think, easily acheiveable using an unbound field and styles but the extra headers... As I was saying in my previous post, you could possibly do something like what is done in that link but you'd have to fiddle with it, for instance use unbound fields and hide the rows which don't actually have any data in them.
I'm not sure how well this would work though. I think one of the Infragistics experts will have to answer this one.
Thanks for your reply!
I would like to take a grid that binds as above and just add the extra descriptive text above their respective field. I would like the extra column headers to size w/ the actual columns.Does this make sense or am I just off my rocker? :)