CHomby
2022-10-11T12:59:46Z
In ActiveX IGrid the function "SetCurCell" invokes the "CurCellChange" event!
In IGrid.NET the function "SetCurCell" does not invoke the "CurCellChangeRequest" event or the "CurRowChangeRequest event"!?!
With the "SetCurCell" command IGrid sets the cursor in the selected row as expected but does not invokes any of the both events!
If I use "IGrid1.Cells(x, y).Selected = True no cell or row change request event will be invoked!
What am I doing wrong?
In the ActiveX IGrid version with VBA everything worked as desired!
Thanks in advance!
Igor/10Tec
2022-10-13T14:03:27Z
As I remember, we decided that if the developer sets the current cell in code, there is no need to raise those events to provide ability to cancel cell change because the developer sets the new cell explicitly. Can you describe your situation and tell us why this may be wrong?
CHomby
2022-10-13T14:47:47Z
Thanks Igor!
Here is a simple example:
I have an IGrid with the master data and an IGrid with the detail data (e.g.: customers - orders).
Every time the user changes the row in the master data IGrid, I call a procedure "Show_Details" in the "CurRowChangeRequest" event procedure to display the corresponding detail data.
Furthermore in a search dialog the user can enter certain search criteria. A self-programmed search routine (emulation of the ActiveX "FindSearchMatchRow" function) then searchs the corresponding row in the master data IGrid and if it is found, I set the cursor to the corresponding master Igrid row with "SetCurCell".
Earlier in the ActiveX - version I needed to do then nothing more, since in the "CurRowChangeRequest" event procedure automatically invokes the procedure "Show_Details" !
Now in the IGrid.Net - version I have to call the procedure for the display of the detail data explicitly after each "SetCurcell" - call!
In case the current master dataset has not yet been fully processed by the user, I could block the change of the master IGrid data row in the "CurRowChangeRequest" event procedure!
For validation routines the "CurRowChanged" event unfortunately comes too late, because the invalid row has then already been left!