We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Tab out of cell, lose edit

In a cell of a GridDataControl if I tab out of the cell when editing, it loses the edit. Is there any way to accept the edit when tabbing out of a cell. I also get this behavior if I click a totally separate control that causes the GDC to be displaced. For example, if the GDC is in a tabbed doc and I switch tabs, the edit is lost. Any ideas?


3 Replies

AR Akila Rajaram Syncfusion Team September 29, 2014 07:40 AM UTC

Hi Mike ,

 

Query 1 : Loses the edit if I tab out of the cell when editing

 

You can hold the cell in edit mode when tabbing out of the cell by using BeginEdit() method . We have prepared the sample based on your requirement . Please refer the below attached sample .

 

In this sample , we load the two GridDataControl in to two different tabs. Please refer the below code snippet ,

 

Code Snippet:

 

void grid_PreviewKeyDown(object sender, KeyEventArgs e)

{

                              this.grid.Model.CurrencyManager.CurrentCell.Activate(this.grid.Model.CurrencyManager.CurrentCell.RowIndex,this.grid.Model.CurrencyManager.CurrentCell.ColumnIndex);

            if (e.Key == Key.Tab)

            {

                this.grid.Model.CurrencyManager.CurrentCell.BeginEdit();

                e.Handled = true;

            }

}

 

Query 2 : switching from one tab in to another, the edit is lost

 

We are not able to replicate the reported query” if the cell in edit  mode and  switched from one tab in to other  tabs, the edit is lost”. Please refer the attached sample and send reproducible sample along with replication procedure .

 

Please let us know if you have any other queries .

 

Regards,

Akila


Attachment: GridDataControlsample_TabNavigation_33c127a2.zip


MA Mike Anderson September 30, 2014 09:02 PM UTC

I found my error - thanks!


AR Akila Rajaram Syncfusion Team October 7, 2014 10:16 AM UTC

Hi Mike ,

 

Thank you for the update, Please let us know if you require further assistance.

 

Regards,

Akila


Loader.
Live Chat Icon For mobile
Up arrow icon