﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebScheduler - How do I prevent categories and resources from being deleted in editing form?</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-do-I-prevent-categories-and-resources-from-being-deleted-in-editing-form/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>How do I prevent categories and resources from being deleted in editing form?</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-do-I-prevent-categories-and-resources-from-being-deleted-in-editing-form/</link><pubDate>Sat, 13 Nov 2010 16:44:47 GMT</pubDate><dc:creator>tim@wrightsweb.com</dc:creator><description>&lt;p&gt;Thanks that did the trick.&lt;/p&gt;</description></item><item><title>How do I prevent categories and resources from being deleted in editing form?</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-do-I-prevent-categories-and-resources-from-being-deleted-in-editing-form/</link><pubDate>Sun, 07 Nov 2010 22:04:28 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;&lt;pre&gt;        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 &amp;lt; rows.length; i&amp;#43;&amp;#43;)
            {
                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 &amp;lt; rows.length; i&amp;#43;&amp;#43;)
            {
                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";
            }
        }&lt;/pre&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>How do I prevent categories and resources from being deleted in editing form?</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/How-do-I-prevent-categories-and-resources-from-being-deleted-in-editing-form/</link><pubDate>Sun, 07 Nov 2010 16:07:50 GMT</pubDate><dc:creator>tim@wrightsweb.com</dc:creator><description>&lt;p&gt;How do I prevent categories and resources from being deleted in editing form? &lt;/p&gt;</description></item></channel></rss>