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.
Unfortunately, activation email could not send to your email. Please try again.

GGC renderer.TextBox.SelectionStart

Thread ID:

Created:

Updated:

Platform:

Replies:

130619 May 22,2017 09:12 AM May 23,2017 08:11 AM Windows Forms 1
loading
Tags: GridGroupingControl
Gregory Pe
Asked On May 22, 2017 09:12 AM

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

Arulpriya Ramalingam [Syncfusion]
Replied On May 23, 2017 08:11 AM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;