PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Prajin P K on December 12, 2019, 04:42:27 AM

Title: Grid Control: Button click functionalities
Post by: Prajin P K on December 12, 2019, 04:42:27 AM
Hi Team,
       We've added buttons on each row to perform delete, save, etc for each record on grid control. please help us provide solution to do those operations in class program(.PVC) while clicking on particular button.
Title: Re: Grid Control: Button click functionalities
Post by: Mike King on December 12, 2019, 10:24:31 AM
One method  would be to add a Cell Logic to the grid in for the column which contains the button -- something like _obj'GridButtonClick(id.row) -- which should invoke the method and pass it the row.

Another is to test the values in id.row and id.column in the Grid on change method and based on the Column invoke whatever logic you want.  Something like:

  Function ChangeGrid_1()
  if id.column = 1 return _Obj'GridButtonClick(id.row) ! Column 1 is the button
  ...
Title: Re: Grid Control: Button click functionalities
Post by: Prajin P K on December 13, 2019, 12:30:52 AM
Thank you mike