cancel
Showing results for 
Search instead for 
Did you mean: 

Select All CheckBox

Former Member
0 Kudos

I am having 5 checkboxes in my screen(user screen). In that 5th checkbox is SelectAll checkbox..By selecting that Checkbox all the other 4 got checked..what i want is, incase if i want to uncheck any checkbox, it should get unchecked by clicking that particluar checkbox...How to do this.....Here is my source in item event...


Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
Try
If pVal.BeforeAction = False Then
Conv_Form.Freeze(True)
Dim ChkSelectAll As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chkAll").Specific
Dim Chk1 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk1").Specific
Dim Chk2 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk2").Specific
Dim Chk3As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chkAC").Specific
Dim Chk4As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk4).Specific
If ChkSelectAll.checked = True Then
Chk1.Checked = True
Chk2.Checked = True
Chk3.Checked = True
Chk4.Checked = True
Else
Chk1.Checked = False
Chk2.Checked = False
Chk3.Checked = False
Chk5.Checked = False
ChkSelectAll.Checked = False
End If
Conv_Form.Freeze(False)
Catch ex As Exception
Conv_Form.Freeze(False)
End Try

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If pVal.BeforeAction = False Then

Conv_Form.Freeze(True)

Dim ChkSelectAll As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chkAll").Specific

Dim Chk1 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk1").Specific

Dim Chk2 As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk2").Specific

Dim Chk3As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chkAC").Specific

Dim Chk4As SAPbouiCOM.CheckBox = Conv_Form.Items.Item("chk4).Specific

If ChkSelectAll.checked = True Then

Chk1.Checked = True

Chk2.Checked = True

Chk3.Checked = True

Chk4.Checked = True

Else

ChkSelectAll.Checked = False

Chk1.Checked = False

Chk2.Checked = False

Chk3.Checked = False

Chk5.Checked = False

End If

Conv_Form.Freeze(False)

Catch ex As Exception

Conv_Form.Freeze(False)

End Try

hi

just changed cheselectall.checked to the next of else

regards

micheal

Former Member
0 Kudos

Hi All,

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

Answers (0)