cancel
Showing results for 
Search instead for 
Did you mean: 

Grid cell value changed

costas_ioannou2
Active Participant
0 Kudos

Hi guys how can I check if the value in a grid cell has been changed?

Right now I have this:

   if (((pVal.FormType == 992 & pVal.ItemUID == "MyGrid" && pVal.EventType != SAPbouiCOM.BoEventTypes.et_VALIDATE) & (pVal.Before_Action == false)))

                {

                    if (pVal.ColUID == "Amount")

                    {

                    }

}

I want to do something if the value in a column is changed.

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the validate After event on the column, you have to check if the value is changed by the property of pval (ItemChanged):

pVal.ItemChanged

your code will look like that :


   if (((pVal.FormType == 992 & pVal.ItemUID == "MyGrid" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE) & (pVal.BeforeAction == true) ))

                {

                    if (pVal.ColUID == "Amount" & pVal.ItemChanged)

                    {

                    }

}

Regards.

Mohamed.

costas_ioannou2
Active Participant
0 Kudos

Hi,

I tried this, but ItemChanged is always false for the grid.

Former Member
0 Kudos

But in your code you had another error, you have to work with the validate event :

pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE

costas_ioannou2
Active Participant
0 Kudos

thanks, I hadn't noticed that.

Answers (0)