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

GGC renderer.TextBox.SelectionStart

How to make

 a cursor  in GridGroupingControl1 at the end of the text when you press TAB

and press button1 in  GridGroupingControl1

//

Just like when you press button2 in  GridGroupingControl2

Where is the mistake
please help


Attachment: test_GGC_010_renderer_5094dc63.rar

1 Reply

AR Arulpriya Ramalingam Syncfusion Team May 23, 2017 12:11 PM UTC

Hi Gregory, 

Thanks for your interest in Syncfusion products. 

We have modified the sample as per your requirement. By default, the current cell will be focused but not in editing mode when the current cell is moved by TAB key and the selection start will be set to the cell only when the cell is in editing mode. In order to set the SelectionStart when the current cell is moved by TAB key, TableControlCurrentCellMoved event can be used. In that event, CurrentCell.BeginEdit() method can be used to set the editing mode for that particular cell. Please make use of below code and sample, 

Code snippet 
 
//Event Subscription 
this.GridGroupingControl1.TableControlCurrentCellMoved += GridGroupingControl1_TableControlCurrentCellMoved; 
 
//Event Customization 
private void GridGroupingControl1_TableControlCurrentCellMoved(object sender, GridTableControlCurrentCellMovedEventArgs e) 
{ 
    if (this.GridGroupingControl1.TableControl.CurrentCell.Renderer is GridTextBoxCellRenderer) 
    { 
        e.TableControl.CurrentCell.BeginEdit(true); 
        GridTextBoxCellRenderer renderer = this.GridGroupingControl1.TableControl.CurrentCell.Renderer as GridTextBoxCellRenderer; 
        renderer.TextBox.SelectionStart = renderer.TextBox.Text.Length;//  renderer.TextBox.SelectAll();   
    } 
} 


Regards, 
Arulpriya 


Loader.
Live Chat Icon For mobile
Up arrow icon