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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

setting focus to a GGC new record cell

Thread ID:





39891 Jan 20,2006 01:26 AM UTC Jan 20,2006 09:09 PM UTC WinForms 3
Tags: GridControl
Eric Weber
Asked On January 20, 2006 01:26 AM UTC

When my form opens, I want to set focus to a specific cell in a GGC. The cell is located in the GridAddNewRecord row. How do I do this? When the form opens, I want the user to just be able to start typing into the cell. thanks!

Administrator [Syncfusion]
Replied On January 20, 2006 05:00 AM UTC

Hi Eric, You can set focus to a particular cell by moving the focus to the required cell. you can achieve this by using MoveTo method in Form_Load Event. Here is the code snippet. this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(3,1,GridSetCurrentCellOptions.SetFocus); Regards Madhan.

Eric Weber
Replied On January 20, 2006 05:19 PM UTC

thanks! The cells in this grid require a double click to activate them. After incorporating your code, I can see a box around the cell (indicating that it has focus), but when I type nothing happens. I''ve added the following lines of code, but with no luck... this.TableControl.CurrentCell.ActivateOnGotFocus = true; this.TableControl.CurrentCell.MoveTo(2,4,GridSetCurrentCellOptions.SetFocus); this.TableControl.CurrentCell.Activate(2,4,GridSetCurrentCellOptions.SetFocus);

stanleyj [Syncfusion]
Replied On January 20, 2006 09:09 PM UTC

Hi Eric, That works as expected, typing initially enters the text in the add new record field. Try BeginEdit to see if that helps. this.gridGroupingControl1.TableControl.CurrentCell.BeginEdit(); Best regards, Stanley


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon