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 2015-09-16 06:46:47

asparatu
Member
Registered: 2014-08-20
Posts: 196

CellDataChanged Event

Hello Jing,
    I notice that CellDataChanged Event does not fire when you delete data from the worksheet.. When i take an add data it works.

Shane

Offline

#2 2015-09-20 12:57:11

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

Re: CellDataChanged Event

Thanks Shane, we consider to fix this from next release.

Offline

#3 2015-09-21 01:35:09

asparatu
Member
Registered: 2014-08-20
Posts: 196

Re: CellDataChanged Event

Hello Jing,
       In the other version celldatachanged event worked when I deleted data out of the cells. When any data is changed or delete it should fire the event. It was doing that before. I use the celldatachange event to check to see if the grid had valid data in valid range so it enables a next button so there would not be any runtime error if they do to soon

And this was working in other version. I just notice in current version it was not working correctly. I will post some code later today  to shows you..

Shane

Offline

#4 2015-09-25 23:54:44

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

Re: CellDataChanged Event

Shane, maybe you have to use RangeDataChanged event; ReoGrid doesn't fire CellDataChanged, instead fires the RangeDataChanged when operation's target is a range, this is for performance consideration.

There are several ways to delete cell data:

1. Set data to null/Nothing

sheet("A1") = "hello"
sheet("A1") = Nothing

Result: CellDataChanged event fired

2. Call DeleteRangeData method

sheet("A1") = "hello"
sheet.DeleteRangeData("A1:B3")

Result: RangeDataChanged event fired

3. Call ClearRangeContent method

Result: Same as cell DeleteRangeData

4. Pressing DEL key

Result: Same as call DeleteRangeData

So if you have code like this, that will work for all cases.

AddHandler sheet.CellDataChanged, Sub(s, ee) MsgBox("Cell data changed.")

AddHandler sheet.RangeDataChanged, Sub(s, ee)
  If ee.Range.Contains(myCell.Position) Then
    MsgBox("Cell data changed.")
  End If
End Sub

Regards, Jing

Last edited by Jingwood (2015-09-25 23:55:11)

Offline

Board footer

Powered by FluxBB