Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to suppress a Click Event for a Check box if it is on a parent line?

Hi,

I am working with VB.NET on a collapsible grid.

The picture below shows my grid as expanded. The grid has one column of Check boxes, and grouping is by "Ship".

When I click on a WHITE check box, this fires a Click Event and a function inserts a calculated number in the "Seq" column.

So far, so good!

But I have noticed that if I accidentally click on a GRAY Check box (which lies on the Parent Line), this freezes the program, because the function is not intended to be used this way.

How can we prevent the Click Event to fire if we click on a GRAY Check box?

If you need further information, I shall be pleased to send.

Thanks

Leon Lai

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

replied

Hi Leon,

There are many ways to check if this is a parent.

One way is

Inside your click event handler

If oGrid.GetDataTableRowIndex(pVal.Row)<0 Then

     'This is not a leaf

     return

End If

You can try other way like :

oGrid.Rows.isLeaf(pval.row)

or recursively check for the oGrid.Rows.GetParent(iRow) method.

Regards
Edy

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question