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
How do I prevent categories and resources from being deleted in editing form?
Hello,
You can hide the element of the edit or delete button in Resources and Categories WebCombo. Before that, you will need to get the Editing form object. Please see the snippet codes below.
function WebScheduler1_OnInitialize(controlId) { var s = ISGetObject("WebScheduler1"); s.ClientSideEvents.OnInitializeResources = "WebScheduler1_OnInitializeResources"; s.ClientSideEvents.OnInitializeCategories = "WebScheduler1_OnInitializeCategories"; } function WebScheduler1_OnInitializeCategories(controlId, categories) { var s = ISGetObject(controlId); var editWindow = s.GetEditingFormWindow(); var wcCategories = editWindow.ISGetObject("wcCategories"); var rows = wcCategories.GetRows(); var categoriesHash = s.CategoriesHash; for (var i = 0; i < rows.length; i++) { var row = rows[i]; var categoryID = row.Value; var category = categoriesHash[categoryID]; var el = row.RowElement.cells[3]; el.childNodes[0].style.display = "none"; el.childNodes[2].style.display = "none"; } } function WebScheduler1_OnInitializeResources(controlId, resources) { var s = ISGetObject(controlId); var editWindow = s.GetEditingFormWindow(); var wcResources = editWindow.ISGetObject("wcResources"); var rows = wcResources.GetRows(); var resourcesHash = s.ResourcesHash; for (var i = 0; i < rows.length; i++) { var row = rows[i]; var resourceID = row.Value; var resource = resourcesHash[resourceID]; var el = row.RowElement.cells[2]; el.childNodes[0].style.display = "none"; el.childNodes[2].style.display = "none"; } }
Regards,Handy
Thanks that did the trick.
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