iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi
I was wondering if anyone could attach an example of how I can add:
Add something to the ContextMenu when on click does something serverside (See Attached img).
I have searched for some while for an example but all the relevant links are forwarding to your Support side which are down :(
Thx in advance
Best Regards Rolf
Hi Rolf,
If you still want to use the default ContextMenu, you can add via clientside and use a SendCustomRequest function to handle a serverside function.
I have attach s sample for your scenario.
Hope this help and have a nice day.
Best regards,
Niven Prasetya
Thx alot for your reply :)
I got it to work with your example:
function WebGrid1_OnColumnContextMenu(controlId, col, menu, isGroup, location) { var separator = new WebMenuItem(); separator.Type = "Separator"; separator.Name = "MySeparator"; var menuItemGem = new WebMenuItem(); menuItemGem.Text = "Save Layout"; menuItemGem.Name = "LayoutSave"; menuItemGem.OnClick = "SaveLayoutValue"; var menuItemGendan = new WebMenuItem(); menuItemGendan.Text = "Get Default Layout"; menuItemGendan.Name = "DefaultLayout"; menuItemGendan.OnClick = "DefaultLayoutValue"; // Add Menu Separator and Menu Item menu.Items.Add(separator); menu.Items.Add(menuItemGem); menu.Items.Add(menuItemGendan); } function SaveLayoutValue() { var grid = ISGetObject("WebGrid1"); var key = "LayoutSave" // grid.AddInput("key", key); grid.SendCustomRequest(); } function DefaultLayoutValue() { var grid = ISGetObject("WebGrid1"); var key = "LayoutDefault" grid.AddInput("key", key); grid.SendCustomRequest(); }
Serverside it calls:
Private Sub WebGrid1_InitializePostBack(ByVal sender As System.Object, ByVal e As ISNet.WebUI.WebGrid.PostbackEventArgs) Handles WebGrid1.InitializePostBack If Not e.Action <> ISNet.WebUI.WebGrid.PostBackAction.Custom Then Select Case Request("key") Case "LayoutSave" ucASPLPGridLayoutCtl.GridLayoutOptions(Request("key")) Case "DefaultLayout" ucASPLPGridLayoutCtl.GridLayoutOptions(Request("key")) Response.Redirect(Request.Url.ToString) End Select End If End Sub
And its working.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname