on 10-27-2007 8:40 AM
Hai to All,
In my screen i have header part and matrix. In matrix i added new item in right click option. Now my aim is if i click the new option i want to perform some event how i can?
If anyone knows tell me
Its urgent..............
Regards,
Anitha
hi Anitha,
As you use menu events and item events we also have Right Click Events. Write your functionality in the Sbo_Appln_RightClickEvent.
Hope this is helpful.
regards,
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i found the solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anita,
Select right click event first
and place the below code in the right click event
If eventInfo.FormUID = "ACT" Then 'give form uid
If eventInfo.ItemUID = "5" And eventInfo.ColUID = "0" Then
If (eventInfo.BeforeAction = True) Then
Dim oMenuItem As SAPbouiCOM.MenuItem
Dim oMenus As SAPbouiCOM.Menus
oMenuItem = SBO_Application.Menus.Item("1280") 'do not change
oMenus = oMenuItem.SubMenus
Try
Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "Del"
oCreationPackage.String = "Delete Row"
oCreationPackage.Enabled = True
Try
oMenus.AddEx(oCreationPackage)
Catch ex As Exception
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Else
Dim oMenuItem As SAPbouiCOM.MenuItem
Dim oMenus As SAPbouiCOM.Menus
Try
SBO_Application.Menus.RemoveEx("Del")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End If
End If
after this got to menu event and place below code
If (pVal.MenuUID = "Del") And (pVal.BeforeAction = False) Then
omatrix = oPopup1.Items.Item("5").Specific
Try
omatrix.DeleteRow()
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
use this for right click for matrix
RIGHT_CLICK_BEFOREACTION(ref SAPbouiCOM.ContextMenuInfo eventInfo, out bool BubbleEvent, SAPbouiCOM.Application oSboApplication, SAPbobsCOM.Company oCompany)
{
BubbleEvent = true;
oForm.EnableMenu("1293", true);
}
this will help u.
thank you,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.