cancel
Showing results for 
Search instead for 
Did you mean: 

disabeling a row within a matrix

Former Member
0 Kudos

Hi all

I'd like to know if there is a way to disable a row within a matrix to make it uneditable?

appreciate the help

Yoav

Accepted Solutions (1)

Accepted Solutions (1)

former_member189387
Active Contributor
0 Kudos

Hi YECHIEL SCHUSSEIM ,

It is not possible to disable a row within a matrix.But we can prevent the user form updating this .

I have catched all events and prevent them from update like

Select Case pVal.EventType

Case SAPbouiCOM.BoEventTypes.et_CLICK

Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED

'//****** Get focus event

Case SAPbouiCOM.BoEventTypes.et_GOT_FOCUS

'// Here u get ur desired column to prvent from updation

If pVal.Before_Action = False Then

Try

oMatrix1 = SBO_Application.Forms.Item(formuid).Items.Item(pVal.ItemUID).Specific

oEdit = oMatrix1.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific

oEdit.Active = False

BubbleEvent = False

Catch ex As Exception

'SBO_Application.MessageBox(ex.Message)

End Try

Hope it helps

Regards

V.Rangarajan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

I've tried your solution only it causes the focus to move to the next column. a behaviour which i want to prevent

appreciate the help

Yoav

former_member189387
Active Contributor
0 Kudos

Hi YECHIEL SCHUSSEIM ,

I think there is no option other than this ....

Regards

V.Rangarajan

former_member189387
Active Contributor
0 Kudos

Hi YECHIEL SCHUSSEIM ,

It is not possible to disable a row within a matrix.But we can prevent the user form updating this .

I have catched all events and prevent them from update like

Select Case pVal.EventType

Case SAPbouiCOM.BoEventTypes.et_CLICK

Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED

'//****** Get focus event

Case SAPbouiCOM.BoEventTypes.et_GOT_FOCUS

If pVal.Before_Action = False Then

Try

oMatrix1 = SBO_Application.Forms.Item(formuid).Items.Item(pVal.ItemUID).Specific

oEdit = oMatrix1.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific

oEdit.Active = False

BubbleEvent = False

Catch ex As Exception

'SBO_Application.MessageBox(ex.Message)

End Try