Hi,
using th einsertion row, it happens that after filling editors with values and hit the enter key, all data disappear fron the insertion row but they are not added to the grid.
I am using the grid in a MVVM pattern and I also tried using a DataGridCollectionViewSource that bind to an ObservableCollection.
Here the xaml definition:
<UserControl x:Class="Budano.Store.Views.CurrencyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:xceedGrid="http://schemas.xceed.com/wpf/xaml/datagrid"
xmlns:xceedViews="clr-namespace:Xceed.Wpf.DataGrid.Views;assembly=Xceed.Wpf.DataGrid"
Width="500" >
<Grid>
<Grid.Resources>
<xceedGrid:DataGridCollectionViewSource x:Key="CurrenciesCollectionViewSource" Source="{Binding Path=Currencies}"/>
</Grid.Resources>
<xceedGrid:DataGridControl
Name="dataGridControl1"
IsDeleteCommandEnabled="True"
ItemsSource="{Binding Source={StaticResource CurrenciesCollectionViewSource}}"
ReadOnly="{Binding Path=UIStatus, Converter={StaticResource UIStatusConverter}}"
AutoCreateColumns="False"
CellEditorDisplayConditions="CellIsCurrent"
EditTriggers="BeginEditCommand, SingleClick, CellIsCurrent, ActivationGesture" ItemScrollingBehavior="Immediate" UpdateSourceTrigger="CellEndingEdit" NavigationBehavior="RowOrCell">
<xceedGrid:DataGridControl.Columns>
<xceedGrid:Column FieldName="Code" Title="Valuta" Width="60" IsMainColumn="True">
<xceedGrid:Column.CellEditor>
<xceedGrid:CellEditor>
<xceedGrid:CellEditor.EditTemplate>
<DataTemplate>
<TextBox Text="{xceedGrid:CellEditorBinding}" MaxLength="4" CharacterCasing="Upper" BorderThickness="0"/>
</DataTemplate>
</xceedGrid:CellEditor.EditTemplate>
</xceedGrid:CellEditor>
</xceedGrid:Column.CellEditor>
</xceedGrid:Column>
<xceedGrid:Column FieldName="Description.Current" Title="Descrizione" Width="*">
<xceedGrid:Column.CellEditor>
<xceedGrid:CellEditor>
<xceedGrid:CellEditor.EditTemplate>
<DataTemplate>
<TextBox Text="{xceedGrid:CellEditorBinding}" MaxLength="60" BorderThickness="0"/>
</DataTemplate>
</xceedGrid:CellEditor.EditTemplate>
</xceedGrid:CellEditor>
</xceedGrid:Column.CellEditor>
</xceedGrid:Column>
<xceedGrid:Column FieldName="HasDecimals" Title="Decimali" Width="60">
<xceedGrid:Column.CellEditor>
<xceedGrid:CellEditor>
<xceedGrid:CellEditor.EditTemplate>
<DataTemplate>
<CheckBox IsChecked="{xceedGrid:CellEditorBinding}" BorderThickness="0"/>
</DataTemplate>
</xceedGrid:CellEditor.EditTemplate>
</xceedGrid:CellEditor>
</xceedGrid:Column.CellEditor>
</xceedGrid:Column>
</xceedGrid:DataGridControl.Columns>
<xceedGrid:DataGridControl.View>
<xceedViews:TableView UseDefaultHeadersFooters="False" IsAlternatingRowStyleEnabled="True">
<xceedGrid:TableView.Footers>
<DataTemplate>
<xceedGrid:InsertionRow />
</DataTemplate>
</xceedGrid:TableView.Footers>
<xceedViews:TableView.Theme>
<xceedViews:AeroNormalColorTheme />
</xceedViews:TableView.Theme>
<xceedViews:TableView.FixedHeaders>
<DataTemplate>
<xceedGrid:HierarchicalGroupByControl xceedViews:TableView.CanScrollHorizontally="False" NoGroupContent="Trascinare una colonna qui per raggruppare" />
</DataTemplate>
<DataTemplate>
<xceedGrid:ColumnManagerRow />
</DataTemplate>
</xceedViews:TableView.FixedHeaders>
</xceedViews:TableView>
</xceedGrid:DataGridControl.View>
</xceedGrid:DataGridControl>
</Grid>
</UserControl>
Any thought why I am not able to add new rows?
Thanks
Antonio