This is a migrated thread and some comments may be shown as answers.

[Solved] how to hide / show custom Attributes on Advance insert form of scheduler ?

1 Answer 130 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
chirag shah
Top achievements
Rank 1
chirag shah asked on 08 Mar 2010, 01:46 PM
I have 3 custom attributes for the scheduler control. but among them 2 attributes are ID which I can't display to Advance insert form of the scheduler. But 3rd one is the attribute which need to be inputted by user. If I set EnableCustomAttributeEditing = true then all are visible on the screen. So How can I hide 2 attributes and show 1 attribute on the Advance insert form of the scheduler. I don't want to use custom Insert Template cause it is not fit in my requirement in the terms of recurrence.

I am using asp.net ajax scheduler control [Not WPF or Silverlight scheduler]

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 11 Mar 2010, 06:47 PM
Hello chirag shah,

Here is sample code that allows for hiding the redundant attributes:

<script type="text/javascript">
        function formCreated(sender, args) {
            var form = args.get_formElement();
             
            hideRedundantAttributes("Attribute2", form);
        }
 
        function hideRedundantAttributes(name, container) {
            var $ = $telerik.$;
            var selector = "[id*='" + name + "']";
 
            $("td input" + selector + ",td label" + selector, container).hide();
        }
     
    </script>
 
    <telerik:RadScheduler ID="RadScheduler1" runat="server"
        StartInsertingInAdvancedForm="True" EnableCustomAttributeEditing="true" CustomAttributeNames="Attribute1, Attribute2"
        ProviderName="XmlSchedulerProvider1" OnClientFormCreated="formCreated" >
    </telerik:RadScheduler>


Kind regards,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
chirag shah
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or