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

Question For DataBound Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

42430 Mar 28,2006 09:30 PM UTC Mar 30,2006 02:42 PM UTC WinForms 4
loading
Tags: GridControl
liheshu
Asked On March 28, 2006 09:30 PM UTC

Hi, I have question for the DataBound Grid. Basically, what I want to do is when I single click on grid cell, it will active cell, user can select, copy and paste text. When I double click on grid cell, I should pop up message box. The problem is when I double click on the cell, it always active cell first and ignore my double click event. I attach the test example. Please take a look at it. Thanks. --Shuyang He

test22.zip

Administrator [Syncfusion]
Replied On March 29, 2006 10:17 AM UTC

Hi Liheshu, By setting ActivateCurrentCellBehavior to SelectAll, the cell will select all the contents in a single click. Me.GridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll The sample created by you works fine here. Here is the sample and image with the required output. Let us know if you need any further assistance. Best regards, Madhan

liheshu
Replied On March 29, 2006 05:06 PM UTC

Hi, Thanks for quick response. Maybe I did not state my problem clearly. Let me rephrase it. Here is my test Process: 1)User single click on the “Column1” Cell, it will select “Column1”. 2)Double Click on “1.2000” Cell, it always active cell first and ignore my double click event. I have to double click my cell again to pop up Message Box. Here is what I want: Single click on any cell will select all text, double click on any cell will always pop up message box.(The problem in the current example is double click on the cell that is not current cell will always active cell first and ignore my double click event. I have to double click the cell again to pop up Message Box.) Thanks. --Shuyang He >Hi Liheshu, > >By setting ActivateCurrentCellBehavior to SelectAll, the cell will select all the contents in a single click. > >Me.GridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll > >The sample created by you works fine here. Here is the sample and image with the required output. > >Let us know if you need any further assistance. > >Best regards, >Madhan

Administrator [Syncfusion]
Replied On March 30, 2006 05:57 AM UTC

Hi Liheshu, Thanks for the information. As you double click, what happens is the first click is caught by the grid and the cell is activated, and then the second click is caught by the cell control. This makes it difficult to recognize a double click. To have this functionality, you must use the CurrentCellControlDoubleClick event. Below is the code snippet ''AddHandler GridDataBoundGrid1.CurrentCellControlDoubleClick, AddressOf Me.gridDataBoundGrid1_CurrentCellControlDoubleClick Private Sub gridDataBoundGrid1_CurrentCellControlDoubleClick(ByVal sender As Object, ByVal e As ControlEventArgs) MessageBox.Show("DoubleClick") End Sub Let us know if this helps. Best regards, Madhan

Administrator [Syncfusion]
Replied On March 30, 2006 02:42 PM UTC

Hi, Yes, thta''s event I''m looking for. Thanks a lot. --Shuyang He >Hi Liheshu, > >Thanks for the information. As you double click, what happens is the first click is caught by the grid and the cell is activated, and then the second click is caught by the cell control. This makes it difficult to recognize a double click. To have this functionality, you must use the CurrentCellControlDoubleClick event. Below is the code snippet > >''AddHandler GridDataBoundGrid1.CurrentCellControlDoubleClick, AddressOf Me.gridDataBoundGrid1_CurrentCellControlDoubleClick > Private Sub gridDataBoundGrid1_CurrentCellControlDoubleClick(ByVal sender As Object, ByVal e As ControlEventArgs) > MessageBox.Show("DoubleClick") > End Sub > >Let us know if this helps. > >Best regards, >Madhan

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.

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

;