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

Double click on column''s header in GDBG

Thread ID:





45299 Jun 16,2006 07:54 AM UTC Jun 16,2006 12:49 PM UTC WinForms 3
Tags: GridControl
Asked On June 16, 2006 07:54 AM UTC

Hi, I have a couple of questions: I''m using a GridDataBoundGrid and i have implemented double_click event handler. I need to find out (inside this handler) if the user clicked on a column''s header or in any other cell. How can i do this? I have found the grid''s property GridControlBaseEventsTarget, and i''m not sure who to use it, could you provide me with an example that uses this property to redirect a key stroke to a different control? Thanks in advance. Borja

Administrator [Syncfusion]
Replied On June 16, 2006 12:25 PM UTC

Hi Borja, Below is a code snippet to check the cell type in the gridDataBoundGrid1.CellDoubleClick event handler. private void gridDataBoundGrid1_CellDoubleClick(object sender, GridCellClickEventArgs e) { GridStyleInfo style = this.gridDataBoundGrid1[e.RowIndex,e.ColIndex]; if(style.CellType =="ColumnHeaderCell") Console.WriteLine("Column Header Cell"); else Console.WriteLine(style.CellType); } The Model.Options.WrapCellBehavior property can be set to GridWrapCellBehavior.NextControlInForm to allow the tab key to move from cell to cell, and then move to the next control when you reach the last cell in the grid. Attached is a sample that sets a custom IGridControlBaseEventsTarget to the GridControlBaseEventsTarget property to redirect the key stroke. Regards, Calvin.


Administrator [Syncfusion]
Replied On June 16, 2006 12:27 PM UTC

Hi Borja, The gridDataBoundGrid1.WantTabKey can also be set to false if you want to navigate to the next control when the tab key is pressed inside a cell. this.gridDataBoundGrid1.WantTabKey = false; Regards, Calvin.

Replied On June 16, 2006 12:49 PM UTC

Thank you, this helps a lot.


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