We are stuck here ! Need help/advise.
We have a scenario as per (using the Order Entry terminology):
Scenario:
While on a the "Order" dbcjgrid (edit mode=true), the user loads another view and then returns to the "Order" view.
Start with:
1. Load an existing "Order" with only 1 grid item.
2. Enter the dbcjgrid and start to edit the "Item ID" column on Row#1
Now:
1. Using the mouse, select row #2 (same column)
2. The dbCJGRID does an InsertRow and send a Clear
3. The Refresh message is received by the dbcjGrid with the eMode=Mode_Clear (1)
All good! And that's how it should be.
Our Problem:
- When cursor/selection is on the "Item ID" or is in Edit Mode in the dbcjGrid,
- Use the mouse to access the menubar and load the "Inventory" view or another related view.
- Return to the original "Order" view by pressing the view's tab, and select row#2 (same column) on the dbcjGrid.
- The dbcjGrid does an InsertRow and sends a Clear request to the grid's server.
- But here's the kicker, the Refresh message received by the dbcjGrid has a eMode=Mode_Find_Or_Clear_Set (2) instead of Mode_Clear
- And because its a Mode_Find_Or_Clear_Set you get the dreaded "Error: 4402 selected col has no selected row" error !!
Why would this be !?
As far I am aware, the (Refresh) MODE_CLEAR is sent to all DEOs attached to the DDO that received the original clear request or message - which in this case was the dbcjGrid's server. And all other related DDOs send their DEOs the refresh (MODE_FIND_OR_CLEAR_SET) notification.
On further investigation, we found another kicker:
- When cursor/selection is on the "Item ID" or is in Edit Mode in the dbcjGrid,
- Use the mouse to access the menubar and load the "Inventory" view or another related view.
- BUT, before returning to the original "order" view, do a Clear_All on the "inventory view" or another related view.
- Return to the original "Order" view by pressing the view's tab, and select row#2 (same column) on the dbcjGrid
- The dbcjGrid does an InsertRow and send a Clear
- dbcjGrid receives a Refresh eMode=Mode_Clear (1) !!??
- No Error
Problem:
1. Unable to replicate this in the Order Entry system - only in ours.
2. Reverted back to base-classes instead of subclass for testing - same issue.
3. Only happens on row #1, if the user starts another view while on row > 1 then no errors.
Question:
1. What would cause the server of a clear operation to send its DEO a Refresh MODE_FIND_OR_CLEAR_SET instead of a MODE_CLEAR notification ?
Notes:
1. The grid's server or DD uses the standard table relates option and is constrained to its header.
2. The "inventory" view has the same DD, but uses the DD relates option and is constrained to another table.
Any help would be appreciated.
Thanks.