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!
AD
Administrator
Syncfusion Team
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.
EW
Eric Weber
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);
ST
stanleyj
Syncfusion Team
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