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.

Double click on column''s header in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

45299 Jun 16,2006 03:54 AM Jun 16,2006 08:49 AM Windows Forms 3
loading
Tags: GridControl
Borja
Asked On June 16, 2006 03:54 AM

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 08:25 AM

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.

435290.zip

Administrator [Syncfusion]
Replied On June 16, 2006 08:27 AM

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.

Borja
Replied On June 16, 2006 08:49 AM

Thank you, this helps a lot.

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.

;