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 not firing event

Thread ID:

Created:

Updated:

Platform:

Replies:

1099 Sep 20,2002 12:16 PM UTC Sep 20,2002 01:53 PM UTC WinForms 1
loading
Tags: GridControl
Amanda Kabak
Asked On September 20, 2002 12:16 PM UTC

I don't want to become a pest on this forum, but I'm tearing my hair out over a very simple task I want to perform with a data-bound grid. Upon double-clicking either in a cell in a row or the row header column for that row, I want to capture that event, get the value entered in the first column of that row and run some code based on this value. I got this to work in a round-about way using the GridDoubleClick event, but at that point, to get the row index of the row double-clicked, I had to have clicked into a cell in the grid _before_ double-clicking on the row header. Then I decided to try the CellDoubleClick event instead, but I can't even get this to fire at all. So my two questions are this: how can you get the index of the row double-clicked if you have only clicked in the row header and not a cell in the row? And, how do you get the CellDoubleClick event to fire. I thought that the latter might have to do with the grid being editable, but when I tried to set EnableEdit to false, I got a runtime error NullReferenceException on that line of code. Phew. Any help greatly appreciated.

Clay Burch [Syncfusion]
Replied On September 20, 2002 01:53 PM UTC

To get the index of the clicked column header in the grid's DoubleClick event, you can use code such as: Dim pt As Point = GridDataBoundGrid1.PointToClient(Control.MousePosition) Dim row, col As Integer GridDataBoundGrid1.ViewLayout.PointToClientRowCol(pt, row, col, True) col = col + GridDataBoundGrid1.LeftColIndex - 1 ' absolute col In the 1.0.2.4, release the CellDoubleClick does not fire because of a coding error in the OnDoubleClick method. If you have access to the source, you can see that method is firing the click event instead of the DoubleClick event. This is corrected in the 1.1.0.0 release due out next week.

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.

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

;