This is a migrated thread and some comments may be shown as answers.

Grid cell goes into edit mode on mouse down instead of mouse up

1 Answer 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Valerie
Top achievements
Rank 1
Valerie asked on 11 Apr 2013, 06:48 PM
I have a problem where the edit mode is conflicting with the drag/drop. The problem happens because the cell goes into edit mode when the mouse is depressed rather than on a mouse up.

The scenario is that the user has clicked on a row. They happen to have clicked in some random cell. Now they want to drag that row. They click in the same cell expecting that they can drag the row but as soon as they press the mouse down, that cell goes into edit mode. So they can't drag.

Is there a way to tell the grid to use mouse-up rather than mouse-down when deciding whether to put it in edit mode.

Thank you,
Valerie

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 16 Apr 2013, 07:02 AM
Hi,

You could achieve your scenario with changing a little bit radGridView.EditTriggers flag enumeration. By default RadGridView starts editing after following actions (press F2, CurrentCellClick, TextInput). I think that if you set radGridView.EditTriggers = "F2, TextInput" you will get the desired result. That way RadGridView will not be able to enter into edit mode with a mouse action. Since this is a little bit strange for end users you can solve this with a few lines of code (just add a ClassHandler for GridViewCell.MouseDoubleClickEvent (or any event you find appropriate)). I'm attaching a sample project that demonstrates the approach with MouseDoubleClick event.
Let me know if this does not help.

Greetings,
Nedyalko Nikolov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Valerie
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or