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

Move focus to filter bar cell issue

Hi, I'm using a GridGroupingControl on a windows forms dialog and would like to set the focus 
in the top left filter bar cell after opening the dialog. So the user can start to type 
in a filter criteria without clicking into the cell. This code (called in the Form_Shown event) does not work 
(also calling this synchronously does not have the desired effect): void Form_Shown(object sender, EventArgs e) { Dispatcher.CurrentDispatcher.BeginInvoke((System.Action)(() => { grid.TableControl.CurrentCell.MoveTo(row, column, GridSetCurrentCellOptions.SetFocus); grid.Focus(); grid.TableControl.CurrentCell.BeginEdit(); } } Any ideas? Thank you!

3 Replies

NK Neelakandan Kannan Syncfusion Team December 8, 2014 10:58 AM UTC

Hi Ralf,

 

Thank you for your interest in Syncfusion products.

 

If you want to set the Currentcell to be focused with editable while form is showing, you can simply set the CurrentCell’s MoveTo method for your needed cell using form Shown event. Please make use of below code and attached sample,

 

Code Snippet:

 

this.Shown += new EventHandler(Form1_Shown);

void Form1_Shown(object sender, EventArgs e)

{

this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(3, 1GridSetCurrentCellOptions.SetFocus); //Specify your needed cell index

}

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: Sample_CurrentCell_Move_1a1b97a6.zip


RK Ralf Kuhn December 9, 2014 11:18 AM UTC

Hello Neelakandan,

thank you very much for your sample. 

Best regards,
Ralf


NK Neelakandan Kannan Syncfusion Team December 10, 2014 07:35 AM UTC

Hi Ralf,

 

Thank you for your update.

 

Please let us know if you need any further assistance on this.

 

Regards,

Neelakandan


Loader.
Live Chat Icon For mobile
Up arrow icon