DependOngrid In Acumatica Or How To Get Currently Selected Record In Grid
14 May 2015
Hello everybody,
today I want to share one important note, for search of which I've spent for two hours.
In grid I've added button in the following way:
<ActionBar ActionsText="True"> <CustomItems> <px:PXToolBarButton> <AutoCallBack Command="RemovePMTask" Target="ds" > </AutoCallBack> </px:PXToolBarButton> </CustomItems> </ActionBar>
Initially described it in the following way:
<px:PXDSCallbackCommand Name="RemovePMTask" Visible="False" </px:PXDSCallbackCommand>
Then added code for button in graph, and noticed terrible behaviour. In my action I wasn't able to get currently selected record in grid. After wondering for two hours, I found that I need to add attribute DependOnGrid. After adding that attribute my code started to work well and get posibility to get currently selected record.
But for getting current record it was nesessary to add DependOnGrid="grdJiraProjects"
<px:PXDSCallbackCommand Name="RemovePMTask" Visible="False" DependOnGrid="grdJiraProjects"> </px:PXDSCallbackCommand>