New to Acumatica custom development but long time experience with classic asp.net development and MVC based development.
Developing my first custom page grid control, I notice that RowSelected events aren’t actually fired when the row is selected. Instead, one gets fired off for each row when the row is created (which feels like a ‘RowCreated’ event). I can at initialization time set whether a row or field can be edited by enabling or disabling a row, but I haven’t been able to figure out how to control whether a row can be deleted except by validating in a RowDeleting event and cancelling it/setting UI errors on failed validation.
(I can enable or disable buttons for the entire grid, but not conditionally based on which row has focus.)
I’d like to be able to do something like when a row is selected enable or disable the delete button or otherwise handle the selection of a row. I have ‘commit changes’ on the fields in the row, and it does seem to post back, but it’s not clear what events its triggering or how I would catch that postback.
Even if it were a bad idea, how would I go about triggering a RowSelected event based on actually selecting the grid row in the UI?
How do I go about enabling or disabling global grid controls like the delete button based on which row has focus/been selected?
I realize that there are probably better ways to handle this, and insight into those would be fine as well, but I’m really trying to understand how the system is intended to work.
Triggering the RowSelected Events
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.