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.

Move focus to filter bar cell issue

Thread ID:

Created:

Updated:

Platform:

Replies:

117729 Dec 4,2014 04:22 AM Dec 10,2014 02:35 AM Windows Forms 3
loading
Tags: GridGroupingControl
Ralf Kuhn
Asked On December 4, 2014 04:22 AM

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!

Neelakandan Kannan [Syncfusion]
Replied On December 8, 2014 05:58 AM

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

Ralf Kuhn
Replied On December 9, 2014 06:18 AM

Hello Neelakandan,

thank you very much for your sample. 

Best regards,
Ralf

Neelakandan Kannan [Syncfusion]
Replied On December 10, 2014 02:35 AM

Hi Ralf,

 

Thank you for your update.

 

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

 

Regards,

Neelakandan


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.

;