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-05 23:17:48

KilkennyCat
Member
Registered: 2016-02-29
Posts: 6

BeforeSelectionRangeChange not change StartCol, when StartCol = 0

// not work
ReoGrid.CurrentWorksheet.BeforeSelectionRangeChange += (s, e) => {
    if (e.StartCol ==0)
    {
        e.StartCol = 1; 
    }
};
// work
ReoGrid.CurrentWorksheet.BeforeSelectionRangeChange += (s, e) => {
    if (e.StartCol == n) //where n > 0
    {
        e.StartCol = 1; 
    }
};

ver 1.3 and 1.2

Offline

#2 2016-08-07 15:23:48

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

Re: BeforeSelectionRangeChange not change StartCol, when StartCol = 0

Not sure what you want do to, but you can't set StartCol greater than EndCol, if mouse clicked on column 0, both StartCol and EndCol are 0, so it is nessarary to set EndCol > or = StartCol, for example:

sheet.BeforeSelectionRangeChange += (s, e) => {
	if (e.StartCol == 0)
	{
		e.StartCol = 1;
		e.EndCol = 1;
	}
};

Last edited by Jingwood (2016-08-07 15:24:47)

Offline

#3 2016-08-09 15:23:39

KilkennyCat
Member
Registered: 2016-02-29
Posts: 6

Re: BeforeSelectionRangeChange not change StartCol, when StartCol = 0

Oh... Thank you! I did not think about the EndCol

Offline

Board footer

Powered by FluxBB