Home Forums WPF controls Xceed DataGrid for WPF InsertionRow editing bug?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22288 |

    After editing data in the InsertionRow and tabbing to the next column, the data disappears. It looks like a databinding problem between the CellEditorTemplate and CellContentTemplate. If you shift-tab back into the column the data is there.

    Any ideas how I could work around this for the moment?

    Thanks
    Michael

    XAML excerpt …

    <ResourceDictionary>

    <CollectionViewSource Source=”{Binding Path=NotesDataModel.NotesData}” x:Key=”notesDataView” />

    <DataTemplate x:Key=”noteCellContentTemplate”>
    <TextBlock Text=”{Binding}” TextWrapping=”Wrap” MinHeight=”22″ />
    </DataTemplate>

    <xcdg:CellEditor x:Key=”noteEditor”>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <TextBox Text=”{xcdg:CellEditorBinding}” FocusVisualStyle=”{x:Null}” BorderThickness=”0″ Background=”Transparent”
    AcceptsReturn=”True” TextWrapping=”Wrap” SpellCheck.IsEnabled=”True” Margin=”0″ Padding=”0″ />
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    <xcdg:CellEditor.ActivationGestures>
    <xcdg:KeyActivationGesture Key=”F4″/>
    <xcdg:KeyActivationGesture Key=”Space”/>
    </xcdg:CellEditor.ActivationGestures>
    </xcdg:CellEditor>

    </ResourceDictionary>

    <xcdg:DataGridControl x:Name=”grid”
    AutoCreateColumns=”False”
    ItemsSource=”{Binding Source={StaticResource notesDataView}}”
    CellEditorDisplayConditions=”CellIsCurrent”
    EditTriggers=”BeginEditCommand,CellIsCurrent,ActivationGesture”
    ValidationMode=”RowEndingEdit”>

    <xcdg:DataGridControl.View>
    <xcdg:TableView KeyboardNavigation.TabNavigation=”Local” >
    <xcdg:TableView.Footers>
    <DataTemplate>
    <xcdg:InsertionRow />
    </DataTemplate>
    </xcdg:TableView.Footers>
    </xcdg:TableView>
    </xcdg:DataGridControl.View>

    <xcdg:DataGridControl.Columns>
    <xcdg:Column FieldName=”Date”
    DisplayMemberBinding=”{Binding Path=Date}”
    Title=”Date”
    Width=”90″>
    </xcdg:Column>

    <xcdg:Column FieldName=”Note”
    Title=”Note”
    Width=”400″
    CellEditor=”{StaticResource noteEditor}”
    CellContentTemplate=”{StaticResource noteCellContentTemplate}”/>

    </xcdg:DataGridControl.Columns>
    </xcdg:DataGridControl>

    Imported from legacy forums. Posted by Michael (had 3088 views)

    Xceed Support
    Member
    Post count: 5658

    Thank you for the report,

    We will take a look into this as soon as we have time. We will post updates in this thread.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 217 views)

    User (Old forums)
    Member
    Post count: 23064

    I’ve found the problem.

    The forground property is getting ‘lost’. Adding Foreground to the InsertionRow seems to fix it:-

    <xcdg:InsertionRow Foreground=”{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(TextElement.Foreground)}” />

    Michael

    ps. The SolidFoundation sample has the same problem.

    Imported from legacy forums. Posted by Michael (had 300 views)

    Xceed Support
    Member
    Post count: 5658

    Great, thank you…

    We were not able to look into this yet… I’m glad you found a solution to your problem.

    I will update the bug report with this information, but this effectively sounds like a known issue.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 4064 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.