ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2016-08-08 13:50:57

danny
Member
Registered: 2016-05-05
Posts: 17

BeforeRangeMove Event not detected

Hi,

I'm handling the BeforeRangeMove event of a worksheet so that I can disable moving a range of cells.

    Private Sub grdCurrSheet_BeforeRangeMove(sender As Object, e As BeforeCopyOrMoveRangeEventArgs) Handles grdCurrSheet.BeforeRangeMove
        e.IsCancelled = True
    End Sub

The event doesn't seem to be raised when I move cells. But I am seeing in the output from Debug: actionmanager: do action: MoveRangeAction[Move Range]

Is this a bug?

Also, is it possible to disable completely the cursor changing to the '4 arrows' so that I can prevent drag and drop of cells?

Thanks,

Danny

Offline

#2 2016-08-10 12:00:16

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: BeforeRangeMove Event not detected

Hi Danny,

It seems a problem that BeforeRangeMove won't be raised. You can use grid.ActionPerformed event and check if an event is MoveRangeAction class.

Also, to disable the mouse dragging feature, you simply set the worksheet settings like:

sheet.SetSettings(WorksheetSettings.Edit_DragSelectionToMoveCells, false);

Offline

#3 2016-08-15 08:42:24

danny
Member
Registered: 2016-05-05
Posts: 17

Re: BeforeRangeMove Event not detected

Many thanks Jing. The disable setting is what I wanted and this works well.

Offline

Board footer

Powered by FluxBB