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-07-13 15:03:15

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

MoveWorksheet function

Hi,

I suspect that the MoveWorksheet function for ReoGridControl is not working, or maybe I am misunderstanding this function. I expected that

grid.MoveWorksheet(0,1)

would move the worksheet at index 0 to position 1 in grid. However, I don't see any change after running this line. Is this a bug?

I also notice that this function returns a Worksheet object which is described as an "Instance of moved worksheet". Is this just for convenience, in case you want to get the sheet that has just been moved? When I assigned the output to a Worksheet object it does return the Worksheet that was meant to be moved, but it has not changed position in the Workbook still.

Thanks,

Danny

Offline

#2 2016-07-13 23:18:43

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

Re: MoveWorksheet function

Hi, I think there is bug in MoveWorksheet method, it does not working as expected.

We will fix it in next release, until it available please use the following code instead:

var sheet1 = grid.Worksheets[0];
grid.RemoveWorksheet(0);
grid.InsertWorksheet(1, sheet1);

Thanks for report!

Offline

#3 2016-07-17 16:26:45

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

Re: MoveWorksheet function

Thanks for clarifying that Jing. And thanks for the temporary solution.

Offline

Board footer

Powered by FluxBB