on 04-11-2006 4:00 PM
I would like to know as to create events ( eliminate, save and cut) using RightClick in VB.Net for SAP B1.
Hi Carlos,
You provide not much information, did you look at the sample project priovided with the SDK?
I suggest you take a look at that project, and if you run into any problems, you'll post them here, and we can take a look and try to help you...
The Sample project could be found in the Folder wich you've installed the SDK: <i>SAP Business One SDK\Samples\COM UI\VB.NET\22.RightClick\</i>
Good luck!
Rowdy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carlos, I'll show you my example code.
In first way, handle Right Event. Whit this code, enables the delete menu when users click over the matrix.
Private Sub SBO_Application_RightClickEvent(ByRef eventInfo As SAPbouiCOM.ContextMenuInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.RightClickEvent
If eventInfo.FormUID = "BOM" Then
oForm = SBO_Application.Forms.Item(eventInfo.FormUID)
If eventInfo.BeforeAction = True And eventInfo.ItemUID = "matrix" Then
'Enable menus
'Delete row
oForm.EnableMenu(1293, True)
Else
'Disable delete row
oForm.EnableMenu(1293, False)
End If
End If
End Sub
With this, SAP delete the row automatically
In this code, 1293 is the Menu Id for Delete Row (Ctrl+K).
In the SAP SDK Help, you will find all other codes for that popup menus.
Add row es 1292.
Hope it helps.
Hi Carlos,
First of all; copy, cut and paste are standard functionalities of SBO that occur on every text enabled field in SBO.
The example shows you how the rightclick event works.
- A right click event occurs when a user right-clicks on a form (obvious )
- You need to capture that event
- On <i>BeforeAction = <b>true</b></i> you'll need to <b>add</b> your menu items to the rightclick menu
- On <i>BeforeAction = <b>false</b></i> you'' need to <b>remove</b> those menuitems
That's all you need to do with the rightclick events. All that is left to do, to make something usefull off this, is capture the <b>menuevents</b> for the created menuitems, and create the functionality you need.
If this is not what you mean/need, <i>please provide us with <u>detailed</u> information what you need.</i>. We would like to help, but if you just post one line which could be interpreted in so many ways, we can't help you very much...
Hope it helps,
Rowdy
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
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.