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

advanced form user control

1 Answer 123 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
lea ginsberger
Top achievements
Rank 1
lea ginsberger asked on 20 Jun 2010, 11:08 AM

We use scheduler control .

To the  appointment we use  advanced form user control  that contain resources  user control.

The advanced form code here:

 

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvancedFormCS.ascx.cs" 
    Inherits="SchedulerTemplatesCS.AdvancedForm" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<%@ Register TagPrefix="scheduler" TagName="ResourceControl" Src="ResourceControlCS.ascx" %> 
<div class="rsAdvancedEdit" style="position: relative; top: -15px; left: -10px;">  
    <div class="rsAdvTitle">  
        <h1 class="rsAdvInnerTitle">  
            עריכת פגישה</h1> 
        <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" 
            CommandName="Cancel" CausesValidation="false" ToolTip='<%# Owner.Localization.AdvancedClose %>'>  
            <%= Owner.Localization.AdvancedClose %> 
        </asp:LinkButton> 
    </div> 
    <div class="rsAdvContentWrapper">  
        <div class="rsAdvOptionsScroll">  
            <asp:Panel runat="server" ID="BasicControlsPanel" CssClass="rsAdvBasicControls">  
                <table> 
                    <tr> 
                        <td> 
                            <label for="<%= StartDate.ClientID %>_dateInput_text">  
                                זמן התחלה</label> 
                            <telerik:RadDatePicker ID="StartDate" runat="server" CssClass="rsAdvDatePicker" Culture="<%# Owner.Culture %>" 
                                MinDate="1900-01-01" SharedCalendarID="SharedCalendar" Skin="<%# Owner.Skin %>" 
                                Width="83px">  
                                <DatePopupButton Visible="False" /> 
                                <DateInput ID="DateInput2" runat="server" DateFormat="<%# Owner.AdvancedForm.DateFormat %>" 
                                    EmptyMessage=" " EmptyMessageStyle-CssClass="radInvalidCss_Default" /> 
                            </telerik:RadDatePicker> 
                            <telerik:RadTimePicker ID="StartTime" runat="server" CssClass="rsAdvTimePicker" Culture="<%# Owner.Culture %>" 
                                Skin="<%# Owner.Skin %>" Width="65px">  
                                <DateInput ID="DateInput3" runat="server" EmptyMessage=" " EmptyMessageStyle-CssClass="radInvalidCss_Default" /> 
                                <TimePopupButton Visible="false" /> 
                                <TimeView ID="TimeView1" runat="server" Columns="2" EndTime="18:00" Interval="00:30" 
                                    ShowHeader="false" StartTime="08:00" /> 
                            </telerik:RadTimePicker> 
                        </td> 
                        <td> 
                            <label for="<%= EndDate.ClientID %>_dateInput_text">  
                                זמן סיום</label> 
                            <telerik:RadDatePicker ID="EndDate" runat="server" CssClass="rsAdvDatePicker" Culture="<%# Owner.Culture %>" 
                                MinDate="1900-01-01" SharedCalendarID="SharedCalendar" Skin="<%# Owner.Skin %>" 
                                Width="83px">  
                                <DatePopupButton Visible="False" /> 
                                <DateInput ID="DateInput4" runat="server" DateFormat="<%# Owner.AdvancedForm.DateFormat %>" 
                                    EmptyMessage=" " EmptyMessageStyle-CssClass="radInvalidCss_Default" /> 
                            </telerik:RadDatePicker> 
                            <telerik:RadTimePicker ID="EndTime" runat="server" CssClass="rsAdvTimePicker" Culture="<%# Owner.Culture %>" 
                                Skin="<%# Owner.Skin %>" Width="65px">  
                                <DateInput ID="DateInput5" runat="server" EmptyMessage=" " EmptyMessageStyle-CssClass="radInvalidCss_Default" /> 
                                <TimePopupButton Visible="false" /> 
                                <TimeView ID="TimeView2" runat="server" Columns="2" EndTime="18:00" Interval="00:30" 
                                    ShowHeader="false" StartTime="08:00" /> 
                            </telerik:RadTimePicker> 
                        </td> 
                    </tr> 
                    <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" 
                        Text="כל היום" Visible="false" /> 
                    <asp:RequiredFieldValidator ID="StartDateValidator" runat="server" ControlToValidate="StartDate" 
                        CssClass="rsValidatorMsg" Display="None" EnableClientScript="true" /> 
                    <asp:RequiredFieldValidator ID="StartTimeValidator" runat="server" ControlToValidate="StartTime" 
                        CssClass="rsValidatorMsg" Display="None" EnableClientScript="true" /> 
                    <asp:RequiredFieldValidator ID="EndDateValidator" runat="server" ControlToValidate="EndDate" 
                        CssClass="rsValidatorMsg" Display="None" EnableClientScript="true" /> 
                    <asp:RequiredFieldValidator ID="EndTimeValidator" runat="server" ControlToValidate="EndTime" 
                        CssClass="rsValidatorMsg" Display="None" EnableClientScript="true" /> 
                    <asp:CustomValidator ID="DurationValidator" runat="server" ControlToValidate="StartDate" 
                        CssClass="rsValidatorMsg rsInvalid" Display="Dynamic" EnableClientScript="false" 
                        OnServerValidate="DurationValidator_OnServerValidate" /> 
                    <%-- RESOURCE CONTROLS --%> 
                    <tr> 
                        <td> 
                           <scheduler:ResourceControl ID="ResInspector" runat="server" Label="פקח:" Skin="<%# Owner.Skin %>" 
                                Type="Inspector" /> 
                             
                        </td> 
                        <td> 
                           <scheduler:ResourceControl ID="ResTest" runat="server" Label="סוג בדיקה:" Skin="<%# Owner.Skin %>" 
                                Type="Test" /> 
                            
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                             
                        </td> 
                        <td> 
                            
                          <scheduler:ResourceControl ID="ResSite" runat="server" Label="אתר:" Skin="<%# Owner.Skin %>" 
                                Type="Site" /> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            <scheduler:ResourceControl ID="ResStatus" runat="server" Label="סטאטוס:" Skin="<%# Owner.Skin %>" 
                                Type="Status" /> 
                       
                        </td> 
                    </tr> 
                    <tr> 
                        <td colspan="2">  
                            <telerik:RadTextBox ID="DescriptionText" runat="server" Label="הערה:" TextMode="MultiLine" 
                                Rows="5" Width="100%" Text='<%# Eval("Description") %>' /> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            <asp:HiddenField ID="OriginalRecurrenceRule" runat="server" /> 
                            <telerik:RadCalendar ID="SharedCalendar" runat="server" CultureInfo="<%# Owner.Culture %>" 
                                RangeMinDate="1900-01-01" ShowRowHeaders="false" Skin="<%# Owner.Skin %>" /> 
                        </td> 
                    </tr> 
                </table> 
            </asp:Panel> 
        </div> 
        <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">  
            <div class="rsAdvButtonWrapper">  
                <asp:LinkButton runat="server" ID="UpdateButton" CssClass="rsAdvEditSave""> 
                    <span>שמור</span> 
                </asp:LinkButton> 
                <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" 
                    CausesValidation="false">  
                    <span>בטל</span> 
                </asp:LinkButton> 
            </div> 
        </asp:Panel> 
    </div> 
</div> 
 

The  resources   code here:



<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ResourceControlCS.ascx.cs" 
    Inherits="SchedulerTemplatesCS.ResourceControl" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<asp:Label runat="server" ID="ResourceLabel" AssociatedControlID="ResourceValue" 
    Text='<%# Label %>' CssClass="rsAdvResourceLabel" /> 
<telerik:RadComboBox runat="server" ID="ResourceValue" CssClass="rsAdvResourceValue" 
    Skin='<%# Skin %>' /> 
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="ResourceValue" 
    ErrorMessage="שדה חובה" runat="server" SetFocusOnError="true" Display="Dynamic" > 
</asp:RequiredFieldValidator> 
 

to the resources   user control controls, when I in the advanced form  on client side

I want to do :

·         Events

·          Default  values

·         Validations

How can I do that ?

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 23 Jun 2010, 01:31 PM
Hi,

I am not sure I am able to understand what you are trying to achieve. Can you please provide some more details about the scenario you are want to implement?

Kind regards,
Dimitar Milushev
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
lea ginsberger
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or