Skip to Content

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

CheckBox Selection

Hi All,

For ex...View this

Inventory --> Inventory Transactions --> Initial Qunatitites --> SelectAll and Clear Selection........

I am having 3 checkboxes..In that last one is SelectAll checkbox..If i select SelectAll checkbox al the other 2 shd be checked..If i unselect the SelectAll chkbox, the other 2 shd be unchecked.

What my need is, when i uncheck Chk1 or Chk2, it should be unchecked and also ChkSelectAll should get unchecked...

If i select ChkSelectAll al the other checkboxes should got checked.When i uncheck that ChkSelectAll, all the other checkboxes shd be uncheked

So, if i uncheck Chk1 or Chk2, ChkSelectAll is unchecked at this time

If i select ChkSelectAll al the other checkboxes should got checked.When i uncheck that ChkSelectAll, all the other checkboxes shd be uncheked

this condition is passed..So the other checkboxes also got unchecked...i want only to uncheck the Particualr checkbox which had checked and also selectAll should get unchecked...Here is my source code which i had given in item event

Try
Conv_Form.Freeze(True)
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
If pVal.ItemUID = "ChkAll" And pVal.BeforeAction = False        Then
       If ChkSelectAll.Checked = True Then
          Chk1.Checked = True
          Chk2.Checked = True
        Else
          Chk1.Checked = False
          Chk2.Checked = False
        End If
End Select
Conv_Form.Freeze(False)
Catch ex As Exception
Conv_Form.Freeze(False)
End Try
End Sub

replied

Hi Sridhar,

well - i don't understand the problem at the moment :/

this code snippet i posted ...

                    If (pVal.ItemUID = "chkAO" Or pVal.ItemUID = "chkAC") And pVal.BeforeAction = False Then
                        If (ChkAO.Checked = True Or ChkAC.Checked = True) Then
                            ChkSelect.Checked = True
                        End If
                        If (ChkAO.Checked = False Or ChkAC.Checked = False) Then
                            ChkSelect.Checked = False
                        End If
                    End If

.

... should uncheck/check the "select_all_checkbox" when all other checkboxes are selected or not selected.

do you want to say that automatically with ChkSelect.Checked = False all 4 checkboxes get unchecked ?

if yes try to use pval.InnerEvent = false

lg David

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