Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
XamGrid: edited cell content is cleared when switching tabs in TabControl

Hi there!

I use XamGrid in my application and ran into the issue with cell editing when switching tabs in TabControl. Here is the markup on which the issue is reproduced:

<TabControl Grid.Row="0"
            <TabItem Header="First Tab">
                <ig:XamGrid ItemsSource="{Binding Persons}">
                        <ig:EditingSettings AllowEditing="Cell"
                                            IsF2EditingEnabled="True" />
                        <ig:TemplateColumn Key="Name"
                                <DataTemplate DataType="{x:Type local:PersonViewModel}">
                                    <TextBlock DataContext="{Binding}"
                                               Text="{Binding Name}" />
                                <DataTemplate DataType="{x:Type local:PersonViewModel}">
                                    <TextBox DataContext="{Binding}"
                                             Text="{Binding Name}" />
            <TabItem Header="Second Tab" />


The XamGrid is in the TabItem and when I switch to another TabItem the content of the edited cell is cleared. 

Steps to reproduce the issue:

  1. Enter cell edit mode;
  2. Switch to another tab without exiting the edit mode;
  3. Go to the previous tab. 

Actual result: the edited cell is empty.

It seems that the cell DataContext binding is broken after exiting the edit mode and switching the tab.

Is there any workaround for this issue or maybe some XamGrid settings need to be added?

I have attached a test project on which the described issue is reproduced, please let me know if any additional information is required.

Thank you