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. Image for the cookie policy date

Question For DataBound Grid

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

4 Replies

AD Administrator Syncfusion Team 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


LI liheshu 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


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon