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-04-25 05:49:25

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

All Actions not firing/changing current sheet actions/iterator value

I downloaded the current version 33.9 of ReoGrid, and i can't seen to find where the following actions are fireing

1) AllActions ( ActionPerformed="myReoGrid_ActionPerformed") is not fireing for anything in
WPF Visual Studio Pro 15.

2) How do I get an action to fire on changing the current worksheet?

3) How do I get the enumerator of a spreadsheet after it is inserted, i.e.,
not the string name, but the number in the list of spreadsheets, without
counting them in the list.  Editing sheets in a workbook may involved reshuffling
and re-ordering the sheets in the book.

4) example UDF's in ReoGrid: How do I import User Defined Functions (IDF) from Excel so they
appear in the help function or can/should I make my own help function when the user enters a '='
in the cell as a pre-edit action?

Please advise promptly. I can provide screen shots and sample code.

Cheers!

Dr. K

Offline

#2 2016-04-25 06:37:54

alexeyrlx
Moderator
From: CIS
Registered: 2015-07-14
Posts: 36
Website

Re: All Actions not firing/changing current sheet actions/iterator value

Hi Dr. K,

Please specify the correct version number of ReoGrid (the current version is 1.2.3).
If you have screenshots and code snippets, make sure you specify them - it will speed up solve of problem.


My English is perfect! (My version of the English language ;-) )

Offline

#3 2016-04-25 12:01:09

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

Re: All Actions not firing/changing current sheet actions/iterator value

Oops... The version is 1.2.3
http://joxi.ru/Vm6d6B5Ix5dBbA
I am moving from Excel-DNA to ReoGrid.
Here is the xml
http://joxi.ru/KAxjnlds4Ejn0m
Here is the code behind
http://joxi.ru/eAODL90h4ol4Or

I can't get the 'ActionPerformed' to fire. It should be going off for every action.

My main issue is to get something to file when the user changes current sheets.
It should also fire when the program starts up on sheet creation and insertion.

Offline

#4 2016-04-25 16:12:21

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

Re: All Actions not firing/changing current sheet actions/iterator value

I found CurrentWorksheetChanged action inappropriately at the ReoGrid level.
It should be (or a copy) at the Workbook level.

xml:
     CurrentWorksheetChanged="myReoGrid_CurrentWorksheetChanged"

....
c#:
       public MainWindow ( )
            {
            InitializeComponent ( );
            InitializeComponent ( );
            myReoGrid . CurrentWorksheetChanged += MyReoGrid_CurrentWorksheetChanged;
            unvell.ReoGrid.Worksheet W= myReoGrid . CurrentWorksheet;
            W . SelectionRangeChanged += W_SelectionRangeChanged_EventHandler;
            W . SelectionMovedForward += ( s , e ) => e . IsCancelled = true;
            W . SelectionMovedBackward += ( s , e ) => e . IsCancelled = true;
            }

        private void MyReoGrid_CurrentWorksheetChanged ( object sender , EventArgs e )
            {
            throw new NotImplementedException ( );
            }

Offline

#5 2016-04-25 16:40:01

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

Re: All Actions not firing/changing current sheet actions/iterator value

actually, the CurrentWorksheetChanged action should be at the Actions level/class, where all of the actions should migrate too.
I know during development actions and properties get scattered all over as a convenience.
For the API, Actions should be the place for Actions.

Offline

#6 2016-04-25 16:50:58

alexeyrlx
Moderator
From: CIS
Registered: 2015-07-14
Posts: 36
Website

Re: All Actions not firing/changing current sheet actions/iterator value

Thanks,  drdbkarron

With these data it will be easier to determine the cause of the problem

Please wait for the response of the main moderator (Mr Jing).


My English is perfect! (My version of the English language ;-) )

Offline

#7 2016-04-25 16:54:17

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

Re: All Actions not firing/changing current sheet actions/iterator value

When the sheet focus cell changes what action is triggered?
Your English is perfect.
You guys can teach me Russian and Japanise.

Offline

#8 2016-04-25 17:07:14

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

Re: All Actions not firing/changing current sheet actions/iterator value

Here, I'm answering my questions as fast as I can post them.
This is not in the xml, it is in the c# actions here:
   public MainWindow ( )
            {
            InitializeComponent ( );
            unvell . ReoGrid . Worksheet W = myReoGrid . CurrentWorksheet;
            W . FocusPosChanged += W_FocusPosChanged;
              }

        private void W_FocusPosChanged ( object sender , unvell . ReoGrid . Events . CellPosEventArgs e )
            {
            unvell . ReoGrid . Worksheet W = myReoGrid . CurrentWorksheet;
            Spreadsheet_Focus_Cursor_label . Content = W . FocusPos;
            }

Offline

#9 2016-04-25 17:20:35

alexeyrlx
Moderator
From: CIS
Registered: 2015-07-14
Posts: 36
Website

Re: All Actions not firing/changing current sheet actions/iterator value

Your English is perfect.
You guys can teach me Russian and Japanise.

You can start to learn these languages using the documentation for ReoGrid ;-)

With the solution to your problem, you can only help Jing.
I'm not so good knowledge of the structure of this control)


My English is perfect! (My version of the English language ;-) )

Offline

#10 2016-04-25 17:23:21

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

Re: All Actions not firing/changing current sheet actions/iterator value

Severity    Code    Description    Project    File    Line    Suppression State
Warning        There was a mismatch between the processor architecture of the project being built "AMD64" and the processor architecture of the reference "Microsoft.Expression.Utility, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.    WpfApplication5

Offline

#11 2016-04-25 17:38:43

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

Re: All Actions not firing/changing current sheet actions/iterator value

Where is a quick and dirty way to translate from c# row,col to external address strings (A1, B2, etc. etc)
When data on the sheet changes, what fires?

Offline

#12 2016-04-26 01:11:01

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

Re: All Actions not firing/changing current sheet actions/iterator value

Hi Dr. K,

1) I just tested ActionPerformed event and it worked in my environment.
    Actions are special classes that provide the ability to undo, redo and repeat operations.
    Not all operations are necessary to be performed using actions.
    Directly call method of workbook and worksheet that is not performed using actions, they are general method call, and ActionPerformed will not be fired.
    After user edited a cell, the SetCellDataAction will be performed, and ActionPerformed event will be fired.
    It is also possible to perform action by programming. Call the method 'DoAction' from workbook instance.

2) CurrentWorksheetChanged event will be fired when current worksheet changed.

3) WorksheetInserted event will be fired when any new worksheet inserted. An initialized workbook contains a default worksheet, it doesn't fire WorksheetInserted event.

4) About customize formula function please refer to https://reogrid.net/document/customize-function/

5)

drdbkarron wrote:

When the sheet focus cell changes what action is triggered?

Yes, the FocusPosChanged event.

6)

drdbkarron wrote:

Where is a quick and dirty way to translate from c# row,col to external address strings (A1, B2, etc. etc)

Please use the CellPosition and RangePosition structures.

// translate index number to address code
var b3 = new CellPosition(2, 1);
b3.ToAddress();
var c4e8 = new RangePosition(3, 2, 5, 3);
c4e8.ToAddress();

// translate address code to index number
var b3 = new CellPosition("B3");
var row = b3.Row;
var col = b3.Col;

var c4e8 = new RangePosition("C4:E8");
var startRow = c4e8.Row;
var startCol = c4e8.Col;
var endRow = c4e8.EndRow;
var endCol = c4e8.EndCol;

7)

drdbkarron wrote:

When data on the sheet changes, what fires?

The CellDataChanged event of worksheet instance.
https://reogrid.net/document/events/

Last edited by Jingwood (2016-04-26 14:14:35)

Offline

Board footer

Powered by FluxBB