Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2175

Column of checkboxes in a grid. Add-on crashes if we click where there is no box.

$
0
0

Hi, everybody

 

My previous post was oversimplified and did not clearly explain my problem.

See: How do we code for "NULL"?

 

So, I restate my problem more precisely.

Many thanks to all those who replied to my previous post.

 

Please see the attached picture which explains my problem.

Capture.JPG

 

 

===========================

The relevant (simplified) codes are shown below:

 

Grid.Columns.Item("Mark as Completed").Type =

SAPbouiCOM.BoGridColumnType.gct_CheckBox

 

RemoveHandler Grid.Columns.Item("Mark as Completed").PressedBefore,

AddressOf OnBeforeMarkasCompletedPressed

 

AddHandler Grid.Columns.Item("Mark as Completed").PressedBefore,

AddressOf OnBeforeMarkasCompletedPressed

 

----------------------------------------------------------------

PrivateSub OnBeforeMarkasCompletedPressed(ByVal Source AsObject,

ByVal pVal As SAPbouiCOM.SBOItemEventArg, ByRef Bubble AsBoolean)

        If Grid.DataTable.GetValue("PO Status", SelectedRow) = "Closed"Then

SBO_Application.MessageBox("CLOSED")

Bubble = False

 

        ElseIf Grid.DataTable.GetValue("PO Status", SelectedRow) = "-"Then

SBO_Application.MessageBox("MINUS")

Bubble = False

 

            'ElseIf Grid.DataTable.GetValue("PO Status", SelectedRow) Is Nothing Then

            ' SBO_Application.MessageBox("BLANK")

            '    Bubble = False

        EndIf

    EndSub

---------------------------------------------------------


Here is the Error Message:


Capture1.JPG



Thanks

Leon


Viewing all articles
Browse latest Browse all 2175

Trending Articles