Skip to main content
Solved

Detect Row Changed event in a grid and make changes to the header


On screen "Pick, Pack, and Ship", (SO302020) I am trying to make some changes, but it is an odd screen so any ideas would be welcome. I have managed to make some changes and I am spending a lot of time in the debugger trying to understand what I can do but I haven't got that far yet.

 

I have been working with methods and events like:

SOShipLineSplit_RowSelecting

SOShipLineSplit_RowSelected

SOShipLineSplit_LineNbr_FieldSelecting

 

These don't fire when I would expect. They don't fire when I click on the grid. Perhaps this is because the grid is is not editable. I don't see how to change this.

 

Basically what I ideally want is to detect when a row is selected or clicked on and then run code populate the Scan field with the Inventory Code.

 

I could also do this from the header on a button or something, but when I play with events on the header and get a link to the table I can't see a selected row in there so I am stumped.

// Acuminator disable once PX1045 PXGraphCreateInstanceInEventHandlers [Justification]

PickPackShip.Host graph = PXGraph.CreateInstance<PickPackShip.Host>();

PXCache split = graph.Caches<SOShipLineSplit>();

I have tried a lot of routes so I just need some advice on how to make this work.

Many thanks.

 

 

 

 

 

 

 

Best answer by darylbowman

There is no Acumatica event corresponding to a grid row being selected. You can get the currently selected row from a grid during an action by using the Current property of the grid's Data View if the grid has SyncPosition = true.

 

RowSelecting happens when a record is being retrieved from the database, and RowSelected happens quite often throughout any process.

 

PS: there may be a JavaScript event that occurs. I forget

View original
Did this topic help you find an answer to your question?

2 replies

darylbowman
Captain II
Forum|alt.badge.img+13
  • 1587 replies
  • Answer
  • March 19, 2024

There is no Acumatica event corresponding to a grid row being selected. You can get the currently selected row from a grid during an action by using the Current property of the grid's Data View if the grid has SyncPosition = true.

 

RowSelecting happens when a record is being retrieved from the database, and RowSelected happens quite often throughout any process.

 

PS: there may be a JavaScript event that occurs. I forget


Thanks for the help. I have gone a different route now. I guess as the table is read only it is harder. If I could have added a checkbox column or something like that to select the row then I might have gone further, but the list is read only and not updateable.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings