The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
It would be useful if you could include in your documentation something about the order in which Grid Events occur.
I have one specific question/problem:
I''m using Grid beta 2. I want to know about a change to the value of a cell as soon as it happens, not when the user has moved to another cell. I''ve hooked up to the Grid CurrentCellChanged Event
In the handler for that event I examine the current value of the cell that has changed. (
eg with code like
_grid[_grid.CurrentCell.RowIndex, _grid.CurrentCell.ColIndex].CellValue)
However, the value returned is not the new value but the value but the value before a change was made. For instance, if I select a value from a drop down list, the change event is fired, but the value in the current cell is the previous item that was selected, not the current value.
Hope you can help with this
Sam
ADAdministrator Syncfusion Team March 15, 2004 03:09 PM UTC
In CurrentCellChanged, you should get the current value from the cell renderer.ControlText. When a cell is actively being edited, the value is only known at the level of the cell control. It is not known at the grid level until you leave the cell.
Dim newValue As string = Me.Grid.CurrentCell.Renderer.ControlText
SJSamuel JackMarch 16, 2004 08:17 AM UTC
What about if cells are changed by another means - programatically, or by pasting in values (which I guess is programatically). Would the CellsChanged event be raised in that case, rather than CurrentCellChanged? Were would I find these new values?
ADAdministrator Syncfusion Team March 16, 2004 09:15 AM UTC
If you are typing into a cell, CellsChanging and CellsChanged are only fired when you leave the cell.
In CellChanging, you can get the cell that is changing from e.Range. You can get the new value from e.CellsInfo. If you are pasteing, the event is fired for every cell, so the new value will be e.CellsInfo[0].CellValue. But in some circumstances (maybe if you are programatically calling ChangeCells), then e.CellsInfo will have multiple values in it as will e.Range.
In CellChanged, the new value is already set into the grid, so you would get it there.