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-06-04 00:51:11

drdbkarron
Member
Registered: 2015-05-06
Posts: 29

Full Cell description in a stack of Worksheets

I need to know what index the current worksheet is in a collection of worksheets.
Here is how I'm kludging it.

I should be able to find an w.MyIndex that would return the sheet

grid.Worksheets[w.MyIndex]==w


       private void DrawDataFocusCell ( gl gl )
            {
            int i = 0;
            Worksheet cW = myReoGrid . CurrentWorksheet;
            foreach ( Worksheet w in myReoGrid . Worksheets )
                {
                if ( w == cW )
                    {
                    DrawDataFocusCell ( gl , w , i );
                    return;
                    }
                i++;
                }
            //DrawDataFocusCell ( gl , myReoGrid . CurrentWorksheet );
            }

Offline

#2 2016-07-08 03:00:52

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

Re: Full Cell description in a stack of Worksheets

The method GetWorksheetIndex of workbook is what you want.

var index = workbook.GetWorksheetIndex(mysheet);

https://reogrid.net/document/worksheet

Offline

Board footer

Powered by FluxBB