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

Ongoing saga with rows OLE D&D in GDBD

OK, one last issue... I have OLE D&D for rows working great! The default column dragging still works too. In order to keep the internal row dragging disabled, I have to disabled the EnableEdit property. Unfortunately this also keeps me from being able to edit a cell, which I need. Is there an alternative way to disable internal handling of row dragging? I''ve tried the following settings but only EnableEdit = False seems to work. gdbgOrders.Model.Options.DragDropDropTargetFlags = GridDragDropFlags.AutoScroll Or GridDragDropFlags.EdgeScroll gdbgOrders.Model.Options.AllowDragSelectedRows = False Thanks, Doug

3 Replies

AD Administrator Syncfusion Team September 2, 2004 02:51 PM UTC

So, you want to prevent dragging the editing currect cell? If so, you can try handling the QueryCanOleDragRange and cancel it there.
private void gridDataBoundGrid1_QueryCanOleDragRange(object sender, GridQueryCanOleDragRangeEventArgs e)
		e.Cancel = true;

DL Doug Lind September 2, 2004 05:40 PM UTC

What I want is to be able to handle row dragging my self as an OLE D&D operation. If I set EnableEdits to true, the grids internal handler moves the row contents in addition to the changes I have made to the underlying datatable. With enable edit false, only my D&D changes occur, which is good. But that also prevents the user from performing cell level edits (e.g. change a date), on the grid. So what I''m after is: 1)Columns drags as the per default. This works now. 2)Row drags via my OLE D&D handler, with no intervention from the grid (i.e. moving row contents). This is what I get with EnableEdits disabled. 3)Ability for the user to edit a cell. Can''t do that now because enable edits is turned off. I need to allow user cell edits but keep any internal handling of row drags turned off. grid.Model.Options.AllowDragSelectedRows is False, but without enable edits disabled, the grid still tries to move row contents. Is this a better explanation? I''m using the QueryOleDataSourceData event to load the clipboard with a GridRangeInfo object, instead of doing a standard clipboard load from the mouse down event. Could this be an issue? Doug

AD Administrator Syncfusion Team September 2, 2004 06:10 PM UTC

You might try turning off these flags, OleDataSource and OleDropTarget, in the grid.ControllerOptions property to see if this will affect this.

Live Chat Icon For mobile
Up arrow icon