With this xaml:
<ig:XamGrid ItemsSource="{Binding Items}" AutoGenerateColumns="False" ColumnWidth="*" BorderThickness="0" HorizontalAlignment="Stretch" Background="White" Foreground="{StaticResource BodyTextColorBrush}" CellStyle="{StaticResource AlternatingCellStyle}">
<ig:XamGrid.Columns> <ig:TextColumn Width="120" Key="Date" ValueConverter="{StaticResource DateConverter}" HeaderStyle="{StaticResource HeaderCellStyle}" IsSummable="False" AllowToolTips="Always"/> <ig:TextColumn Width="180" Key="Reference" HeaderStyle="{StaticResource HeaderCellStyle}" IsSummable="False" AllowToolTips="Always"/> <ig:TextColumn Width="3*" Key="CategoryName" HeaderText="Category" HeaderStyle="{StaticResource HeaderCellStyle}" IsSummable="False" AllowToolTips="Always"/> <ig:TextColumn Width="2*" Key="AnalysisCodesText" HeaderText="Analysis" HeaderStyle="{StaticResource HeaderCellStyle}" IsSummable="False" AllowToolTips="Always"/> <ig:TextColumn Width="80" Key="DebitValue" HeaderText="Debit" ValueConverter="{StaticResource StringConverter}" HeaderStyle="{StaticResource HeaderCellStyle}" CellStyle="{StaticResource RightCellStyle}" IsSummable="False" AllowToolTips="Always"> <ig:TextColumn.SummaryColumnSettings> <ig:SummaryColumnSettings> <ig:SummaryColumnSettings.SummaryOperands> <Controls:DebitValueSummariserOperand/> </ig:SummaryColumnSettings.SummaryOperands> </ig:SummaryColumnSettings> </ig:TextColumn.SummaryColumnSettings> </ig:TextColumn> <ig:TextColumn Width="80" Key="CreditValue" HeaderText="Credit" ValueConverter="{StaticResource StringConverter}" HeaderStyle="{StaticResource HeaderCellStyle}" CellStyle="{StaticResource RightCellStyle}" IsSummable="False" AllowToolTips="Always"> <ig:TextColumn.SummaryColumnSettings> <ig:SummaryColumnSettings> <ig:SummaryColumnSettings.SummaryOperands> <Controls:CreditValueSummariserOperand/> </ig:SummaryColumnSettings.SummaryOperands> </ig:SummaryColumnSettings> </ig:TextColumn.SummaryColumnSettings> </ig:TextColumn> <ig:ImageColumn Key="EditImage" HorizontalContentAlignment="Center" Width="20" HeaderText=" " HeaderStyle="{StaticResource HeaderCellStyle}" IsSummable="False" AllowToolTips="Always"/> <ig:ImageColumn Key="InvoiceImage" HorizontalContentAlignment="Center" Width="20" HeaderText=" " HeaderStyle="{StaticResource HeaderCellStyle}" IsSummable="False" AllowToolTips="Always"/> </ig:XamGrid.Columns> <ig:XamGrid.DeferredScrollingSettings> ... </ig:XamGrid.DeferredScrollingSettings> <ig:XamGrid.SummaryRowSettings> <ig:SummaryRowSettings AllowSummaryRow="Bottom" Style="{StaticResource EmptySummaryCellStyle}"/> </ig:XamGrid.SummaryRowSettings> </ig:XamGrid>
Restoring the properties doesn't work. PersistenceLoaded only has one PropertyPersistenceExceptionDetails:
Exception: "A column has been added with an Empty key. All columns must have a unique key."PropertyInfo: {Infragistics.Controls.Grids.ColumnLayoutCollection ColumnLayouts}PropertyPath "ColumnLayouts"
Is it obvious what I'm getting wrong?
Hello,
I believe that one of the Column Keys is referencing a property that does not exist. Did you rename a property in your data source or is there a misspelled Key that doesn't match the property name exaclty?
No, neither the datasource nor the grid definition has changed (in fact, I get these errors saving & loading in the same session)
James