Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
149 views
Hello Telerik Community!

I have a bit of a complex question and I need an answer as soon as possible. 

I am using the RadScheduler and have binded it with a Web Service call and everything runs smoothly. I have essentially two questions.

First one is simpler:
The auto generated advanced insert form for this grid doesn't have a field for description. It comes up when it is bound with a DataSource like a SqlDataSource but not with the Web Service binding. Am I missing something or is that by design?


Second question is:
My client has requested that they want to be able to search for one of the resources for the appointment via a Grid where they filter the results and then select the one they want. Resources currently are only viewed via a RadComboBox which doesn't have enough functionality. The resource is a patient and they want to be able to search by SSN, DOB, Name etc so Grid is much better at filtering the results. I looked at the demo online and made a custom form and was able to generate it fine. The only issue is that now when I press the save button I get the following error:

http://www.screencast.com/t/mGjp47fj

However if I use the built in one it works fine. I will paste the code here of the AdvancedForm.ascx. It is the only thing I changed. I will also post the code for my radscheduler. I appreciate any insight! It's the last thing I need working before I am finished with this project so please helppp :) Thank you!

AdvancedForm.ascx:
<%@ Control Language="C#" AutoEventWireup="True"
    Inherits="RadSchedulerAdvancedFormAdvancedForm" CodeBehind="AdvancedForm.ascx.cs" %>
 
<%@ Register TagPrefix="scheduler" TagName="ResourceControl" Src="ResourceControl.ascx" %>
<%@ Register TagPrefix="scheduler" TagName="MultipleValuesResourceControl" Src="MultipleValuesResourceControl.ascx" %>
 
<div class="rsAdvancedEdit rsAdvancedModal" style="position: relative">
    <div class="rsModalBgTopLeft">
    </div>
    <div class="rsModalBgTopRight">
    </div>
    <div class="rsModalBgBottomLeft">
    </div>
    <div class="rsModalBgBottomRight">
    </div>
    <%-- Title bar. --%>
    <div class="rsAdvTitle">
        <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%>
        <h1 class="rsAdvInnerTitle">
            <%= (this.Mode.ToString() == "Edit") ? Owner.Localization.AdvancedEditAppointment : Owner.Localization.AdvancedNewAppointment %></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">
            <%-- Scroll container - when the form height exceeds MaximumHeight scrollbars will appear on this element--%>
            <div class="rsAdvOptionsScroll">
                <asp:Panel runat="server" ID="AdvancedEditOptionsPanel" CssClass="rsAdvOptions">
                    <asp:Panel runat="server" ID="BasicControlsPanel" CssClass="rsAdvBasicControls" OnDataBinding="BasicControlsPanel_DataBinding">
                        <telerik:RadTextBox runat="server" ID="SubjectText" Width="100%" Label='<%# Owner.Localization.AdvancedSubject + ":" %>'
                            EnableSingleInputRendering="false" />
                        <asp:RequiredFieldValidator runat="server" ID="SubjectValidator" ControlToValidate="SubjectText"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <ul class="rsTimePickers">
                            <li class="rsTimePick" style="width: 244px;">
                                <label for='<%= StartDate.ClientID %>_dateInput_text'>
                                    <%= Owner.Localization.AdvancedFrom %>:
                                </label>
                                <%--
                                Leaving a newline here will affect the layout, so we use a comment instead.
                                --%><telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker"
                                    Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                    MinDate="1900-01-01">
                                    <DatePopupButton Visible="False" />
                                    <DateInput ID="DateInput2" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                        EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                                </telerik:RadDatePicker>
                                <%--
                             
                                --%><telerik:RadTimePicker runat="server" ID="StartTime" CssClass="rsAdvTimePicker"
                                    Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'>
                                    <DateInput ID="DateInput3" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" "
                                        EnableSingleInputRendering="false" />
                                    <TimePopupButton Visible="false" />
                                    <TimeView ID="TimeView1" runat="server" Columns="2" ShowHeader="false" StartTime="08:00"
                                        EndTime="18:00" Interval="00:30" />
                                </telerik:RadTimePicker>
                            </li>
                            <li class="rsTimeZonesWrapper">
                                <telerik:RadComboBox runat="server" Visible="true" ID="TimeZonesDropDown" Width="230"
                                    Label="<%# Owner.Localization.AdvancedTimeZone + ':' %>" Skin='<%# Owner.Skin %>'>
                                </telerik:RadComboBox>
                            </li>
                            <li class="rsAllDayWrapper">
                                <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" />
                            </li>
                            <li class="rsTimePick rsEndTimePick" style="width: 244px;">
                                <label for='<%= EndDate.ClientID %>_dateInput_text'>
                                    <%= Owner.Localization.AdvancedTo%>:
                                </label>
                                <%--
                             
                                --%><telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker"
                                    Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                    MinDate="1900-01-01">
                                    <DatePopupButton Visible="False" />
                                    <DateInput ID="DateInput4" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                        EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                                </telerik:RadDatePicker>
                                <%--
                            FT
                                --%><telerik:RadTimePicker runat="server" ID="EndTime" CssClass="rsAdvTimePicker"
                                    Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'>
                                    <DateInput ID="DateInput5" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" "
                                        EnableSingleInputRendering="false" />
                                    <TimePopupButton Visible="false" />
                                    <TimeView ID="TimeView2" runat="server" Columns="2" ShowHeader="false" StartTime="08:00"
                                        EndTime="18:00" Interval="00:30" />
                                </telerik:RadTimePicker>
                            </li>
                        </ul>
                        <div class="rsReminderWrapper">
                            <telerik:RadComboBox runat="server" ID="ReminderDropDown" Label="<%# Owner.Localization.Reminder + ':' %>"
                                Width="120px" Skin='<%# Owner.Skin %>'>
                                <Items>
                                    <telerik:RadComboBoxItem Text='<%# Owner.Localization.ReminderNone %>' Value="" />
                                    <telerik:RadComboBoxItem Text='<%# "0 " + Owner.Localization.ReminderMinutes %>'
                                        Value="0" />
                                    <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderMinutes %>'
                                        Value="5" />
                                    <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderMinutes %>'
                                        Value="10" />
                                    <telerik:RadComboBoxItem Text='<%# "15 " + Owner.Localization.ReminderMinutes %>'
                                        Value="15" />
                                    <telerik:RadComboBoxItem Text='<%# "30 " + Owner.Localization.ReminderMinutes %>'
                                        Value="30" />
                                    <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderHour %>' Value="60" />
                                    <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderHours %>' Value="120" />
                                    <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderHours %>' Value="180" />
                                    <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderHours %>' Value="240" />
                                    <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderHours %>' Value="300" />
                                    <telerik:RadComboBoxItem Text='<%# "6 " + Owner.Localization.ReminderHours %>' Value="360" />
                                    <telerik:RadComboBoxItem Text='<%# "7 " + Owner.Localization.ReminderHours %>' Value="420" />
                                    <telerik:RadComboBoxItem Text='<%# "8 " + Owner.Localization.ReminderHours %>' Value="480" />
                                    <telerik:RadComboBoxItem Text='<%# "9 " + Owner.Localization.ReminderHours %>' Value="540" />
                                    <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderHours %>' Value="600" />
                                    <telerik:RadComboBoxItem Text='<%# "11 " + Owner.Localization.ReminderHours %>' Value="660" />
                                    <telerik:RadComboBoxItem Text='<%# "12 " + Owner.Localization.ReminderHours %>' Value="720" />
                                    <telerik:RadComboBoxItem Text='<%# "18 " + Owner.Localization.ReminderHours %>' Value="1080" />
                                    <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderDays %>' Value="1440" />
                                    <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderDays %>' Value="2880" />
                                    <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderDays %>' Value="4320" />
                                    <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderDays %>' Value="5760" />
                                    <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderWeek %>' Value="10080" />
                                    <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderWeeks %>' Value="20160" />
                                </Items>
                            </telerik:RadComboBox>
                        </div>
                        <asp:RequiredFieldValidator runat="server" ID="StartDateValidator" ControlToValidate="StartDate"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:RequiredFieldValidator runat="server" ID="StartTimeValidator" ControlToValidate="StartTime"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:RequiredFieldValidator runat="server" ID="EndDateValidator" ControlToValidate="EndDate"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:RequiredFieldValidator runat="server" ID="EndTimeValidator" ControlToValidate="EndTime"
                            EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                        <asp:CustomValidator runat="server" ID="DurationValidator" ControlToValidate="StartDate"
                            EnableClientScript="false" Display="Dynamic" CssClass="rsValidatorMsg rsInvalid"
                            OnServerValidate="DurationValidator_OnServerValidate" />
                    </asp:Panel>
                    <asp:Panel runat="server" ID="AdvancedControlsPanel" CssClass="rsAdvMoreControls">
                        <%--                    <label>
                        Color:
                    </label>
 
                    <telerik:RadColorPicker ID="AppointmentColorPicker" runat="server" CssClass="rsAdvResourceValue"
                        ShowIcon="true" PaletteModes="WebPalette">
                    </telerik:RadColorPicker>--%>
 
                        <table>
                            <tr>
                                <td>Search Patient:
                                </td>
                            </tr>
                            <tr>
                                <td>
 
 
                                    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0"
                                        DataSourceID="SqlDataSourceAllPats" GridLines="None" AllowFilteringByColumn="True" AllowPaging="True"
                                        EnableLinqExpressions="False" Width="600px" OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">
 
                                        <MasterTableView Width="600px" DataSourceID="SqlDataSourceAllPats" AutoGenerateColumns="False" DataKeyNames="Account_Number" ClientDataKeyNames="Account_Number">
 
                                            <CommandItemSettings ExportToPdfText="Export to PDF" />
                                            <Columns>
                                                <telerik:GridButtonColumn HeaderText="" Text="Select" CommandName="Select" />
                                                <telerik:GridBoundColumn FilterControlAltText="Filter Account_Number column" HeaderText="Acct No"
                                                    UniqueName="AcctNo" DataField="Account_Number" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
                                                    ShowFilterIcon="false"
                                                    EmptyDataText="" Visible="true" ItemStyle-Width="60px" HeaderStyle-Width="60px">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn FilterControlAltText="Filter FirstName column" HeaderText="First Name"
                                                    UniqueName="FirstName" DataField="FirstName" EmptyDataText="" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
                                                    ShowFilterIcon="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn FilterControlAltText="Filter LastName column" HeaderText="Last Name"
                                                    UniqueName="LastName" DataField="LastName" EmptyDataText="" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
                                                    ShowFilterIcon="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn FilterControlAltText="Filter Birthdate column" HeaderText="Date of Birth"
                                                    UniqueName="Birthdate" DataField="Birthdate" EmptyDataText="" DataFormatString="{0:MM/dd/yyyy}">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn FilterControlAltText="Filter SSN column" HeaderText="SSN"
                                                    UniqueName="SSN" DataField="SSN" EmptyDataText="" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith"
                                                    ShowFilterIcon="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn FilterControlAltText="Filter Address column" HeaderText="Address"
                                                    UniqueName="Address" DataField="Address" EmptyDataText="">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                                                <HeaderStyle Width="20px" />
                                            </RowIndicatorColumn>
                                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                                                <HeaderStyle Width="20px" />
                                            </ExpandCollapseColumn>
                                            <EditFormSettings>
                                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                </EditColumn>
                                            </EditFormSettings>
 
                                        </MasterTableView>
                                        <FilterMenu EnableImageSprites="False">
                                        </FilterMenu>
                                        <ClientSettings>
                                            <Scrolling AllowScroll="true"></Scrolling>
                                        </ClientSettings>
                                    </telerik:RadGrid>
 
                                </td>
                            </tr>
                        </table>
                        <asp:SqlDataSource ID="SqlDataSourceAllPats" runat="server"
                            ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>"
                            SelectCommand="sp_patientList" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter DefaultValue="C002" Name="SITE_ID_LNK" SessionField="SiteId" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:Panel runat="server" ID="ResourceControls">
                            <%-- RESOURCE CONTROLS --%>
                            <ul class="rsResourceControls">
                                <li>
                                    <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                                    <scheduler:ResourceControl runat="server" ID="ResPatient" Type="Patient" Label="Patient:"
                                        Skin='<%# Owner.Skin %>' />
                                </li>
                                <li>
                                    <scheduler:ResourceControl runat="server" ID="ResPhysician" Type="Physician"
                                        Label="Physician: " />
                                </li>
                                <li>
                                    <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                                    <scheduler:ResourceControl runat="server" ID="ResFacility" Type="Facility" Label="Facility:"
                                        Skin='<%# Owner.Skin %>' />
                                </li>
                                <li>
                                    <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                                    <scheduler:ResourceControl runat="server" ID="ResApptType" Type="ApptType" Label="ApptType:"
                                        Skin='<%# Owner.Skin %>' />
                                </li>
                                <!-- Optionally add more ResourceControl instances here -->
                            </ul>
                        </asp:Panel>
                    </asp:Panel>
                    <telerik:RadTextBox runat="server" ID="DescriptionText" TextMode="MultiLine" Columns="50"
                        Rows="5" Width="100%" Label='<%# Owner.Localization.AdvancedDescription + ":" %>'
                        Text='<%# Eval("Description") %>' EnableSingleInputRendering="false" />
                    <span class="rsAdvResetExceptions">
                        <asp:LinkButton runat="server" Visible="false" ID="ResetExceptions" OnClick="ResetExceptions_OnClick" />
                    </span>
                    <telerik:RadSchedulerRecurrenceEditor runat="server" ID="AppointmentRecurrenceEditor" />
                    <asp:HiddenField runat="server" ID="OriginalRecurrenceRule" />
                    <telerik:RadCalendar runat="server" ID="SharedCalendar" Skin='<%# Owner.Skin %>'
                        CultureInfo='<%# Owner.Culture %>' ShowRowHeaders="false" RangeMinDate="1900-01-01" />
                </asp:Panel>
            </div>
            <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">
                <div class="rsAdvButtonWrapper">
                    <asp:LinkButton runat="server" ID="UpdateButton" CssClass="rsAdvEditSave">
                    <span><%= Owner.Localization.Save %></span>
                    </asp:LinkButton>
                    <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel"
                        CausesValidation="false">
                    <span><%= Owner.Localization.Cancel %></span>
                    </asp:LinkButton>
                </div>
            </asp:Panel>
        </div>
    
</div>


AdvancedForm.ascx.cs"
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using Telerik.Web.UI;
 
 
 
 
public enum RadSchedulerAdvancedFormAdvancedFormMode
{
    Insert,
    Edit
}
 
public partial class RadSchedulerAdvancedFormAdvancedForm : System.Web.UI.UserControl
{
    #region Private members
 
    private bool FormInitialized
    {
        get
        {
            return (bool)(ViewState["FormInitialized"] ?? false);
        }
 
        set
        {
            ViewState["FormInitialized"] = value;
        }
    }
 
    private RadSchedulerAdvancedFormAdvancedFormMode mode = RadSchedulerAdvancedFormAdvancedFormMode.Insert;
 
    #endregion
 
    #region Protected properties
 
    protected RadScheduler Owner
    {
        get
        {
            return Appointment.Owner;
        }
    }
 
    protected Appointment Appointment
    {
        get
        {
            SchedulerFormContainer container = (SchedulerFormContainer)BindingContainer;
            return container.Appointment;
        }
    }
 
    #endregion
 
    #region Attributes and resources
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public string Description
    {
        get
        {
             
            return DescriptionText.Text;
        }
 
        set
        {
            DescriptionText.Text = value;
        }
    }
 
    //public string AppointmentColor
    //{
    //    get
    //    {
    //        // No color selected
    //        if (AppointmentColorPicker.SelectedColor.A == 0)
    //            return null;
 
    //        return AppointmentColorPicker.SelectedColor.ToArgb().ToString();
    //    }
 
    //    set
    //    {
    //        if (string.IsNullOrEmpty(value))
    //            return;
 
    //        int argbValue;
    //        if (int.TryParse(value, out argbValue))
    //            AppointmentColorPicker.SelectedColor = Color.FromArgb(argbValue);
    //    }
    //}
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public object Patient
    {
        get
        {
            return ResPatient.Value;
        }
 
        set
        {
            ResPatient.Value = value;
        }
    }
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public object Physician
    {
        get
        {
            return ResPhysician.Value;
        }
 
        set
        {
            ResPhysician.Value = value;
        }
    }
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public object Facility
    {
        get
        {
            return ResFacility.Value;
        }
 
        set
        {
            ResFacility.Value = value;
        }
    }
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public object ApptType
    {
        get
        {
            return ResApptType.Value;
        }
 
        set
        {
            ResApptType.Value = value;
        }
    }
 
    #endregion
 
    #region Public properties
 
    public RadSchedulerAdvancedFormAdvancedFormMode Mode
    {
        get
        {
            return mode;
        }
        set
        {
            mode = value;
        }
    }
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public string Subject
    {
        get
        {
            return SubjectText.Text;
        }
 
        set
        {
            SubjectText.Text = value;
        }
    }
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public DateTime Start
    {
        get
        {
            DateTime result = StartDate.SelectedDate.Value.Date;
 
            if (AllDayEvent.Checked)
            {
                result = result.Date;
            }
            else
            {
                TimeSpan time = StartTime.SelectedDate.Value.TimeOfDay;
                result = result.Add(time);
            }
 
            return Owner.DisplayToUtc(result);
        }
 
        set
        {
            StartDate.SelectedDate = Owner.UtcToDisplay(value);
            StartTime.SelectedDate = Owner.UtcToDisplay(value);
        }
    }
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public DateTime End
    {
        get
        {
            DateTime result = EndDate.SelectedDate.Value.Date;
 
            if (AllDayEvent.Checked)
            {
                result = result.Date.AddDays(1);
            }
            else
            {
                TimeSpan time = EndTime.SelectedDate.Value.TimeOfDay;
                result = result.Add(time);
            }
 
            return Owner.DisplayToUtc(result);
        }
 
        set
        {
            EndDate.SelectedDate = Owner.UtcToDisplay(value);
            EndTime.SelectedDate = Owner.UtcToDisplay(value);
        }
    }
 
 
    //[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    //public string RecurrenceRuleText
    //{
    //    get
    //    {
    //        if (Owner.RecurrenceSupport)
    //        {
    //            bool dateSpecified = StartDate.SelectedDate.HasValue && EndDate.SelectedDate.HasValue;
    //            bool timeSpecified = StartTime.SelectedDate.HasValue && EndTime.SelectedDate.HasValue;
 
    //            if ((AllDayEvent.Checked && !dateSpecified) ||
    //                (!AllDayEvent.Checked && !(dateSpecified && timeSpecified)))
    //            {
    //                return string.Empty;
    //            }
 
    //            AppointmentRecurrenceEditor.StartDate = Start;
    //            AppointmentRecurrenceEditor.EndDate = End;
 
    //            RecurrenceRule rrule = AppointmentRecurrenceEditor.RecurrenceRule;
 
    //            if (rrule == null)
    //            {
    //                return string.Empty;
    //            }
 
    //            RecurrenceRule originalRule;
    //            if (RecurrenceRule.TryParse(OriginalRecurrenceRule.Value, out originalRule))
    //            {
    //                rrule.Exceptions = originalRule.Exceptions;
    //            }
 
    //            if (rrule.Range.RecursUntil != DateTime.MaxValue)
    //            {
    //                rrule.Range.RecursUntil = Owner.DisplayToUtc(rrule.Range.RecursUntil);
 
    //                if (!AllDayEvent.Checked)
    //                {
    //                    rrule.Range.RecursUntil = rrule.Range.RecursUntil.AddDays(1);
    //                }
    //            }
 
    //            return rrule.ToString();
    //        }
 
    //        return string.Empty;
    //    }
 
    //    set
    //    {
    //        RecurrenceRule rrule;
    //        RecurrenceRule.TryParse(value, out rrule);
 
    //        if (rrule != null)
    //        {
    //            if (rrule.Range.RecursUntil != DateTime.MaxValue)
    //            {
    //                DateTime recursUntil = Owner.UtcToDisplay(rrule.Range.RecursUntil);
 
    //                if (!IsAllDayAppointment(Appointment))
    //                {
    //                    recursUntil = recursUntil.AddDays(-1);
    //                }
 
    //                rrule.Range.RecursUntil = recursUntil;
    //            }
 
    //            AppointmentRecurrenceEditor.RecurrenceRule = rrule;
 
    //            OriginalRecurrenceRule.Value = value;
    //        }
    //    }
    //}
 
    //[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    //public string Reminder
    //{
    //    get
    //    {
    //        if (Owner.RemindersSupport && ReminderDropDown.SelectedValue != string.Empty)
    //        {
    //            return ReminderDropDown.SelectedValue;
    //        }
 
    //        return string.Empty;
    //    }
 
    //    set
    //    {
    //        RadComboBoxItem item = ReminderDropDown.Items.FindItemByValue(value);
    //        if (item != null)
    //        {
    //            item.Selected = true;
    //        }
    //    }
    //}
 
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
    public string TimeZoneID
    {
        get
        {
            return TimeZonesDropDown.SelectedValue;
        }
 
        set
        {
 
            RadComboBoxItem item = TimeZonesDropDown.Items.FindItemByValue(value);
            if (item != null)
            {
                item.Selected = true;
            }
        }
    }
 
    #endregion
 
    protected void Page_Load(object sender, EventArgs e)
    {
        UpdateButton.ValidationGroup = Owner.ValidationGroup;
        UpdateButton.CommandName = Mode == RadSchedulerAdvancedFormAdvancedFormMode.Edit ? "Update" : "Insert";
 
        if (Owner.AdvancedForm.EnableTimeZonesEditing)
            PopulateTimeZonesDropDown();
        else
            TimeZonesDropDown.Visible = false;
 
        if (!Owner.Reminders.Enabled)
            ReminderDropDown.Visible = false;
 
        InitializeStrings();
        InitializeRecurrenceEditor();
 
        if (!FormInitialized)
        {
           // UpdateResetExceptionsVisibility();
        }
        RadGrid1.DataBind();
    }
 
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
 
        if (!FormInitialized)
        {
            if (IsAllDayAppointment(Appointment))
            {
                EndDate.SelectedDate = EndDate.SelectedDate.Value.AddDays(-1);
            }
 
            FormInitialized = true;
        }
 
        if (String.IsNullOrEmpty(Appointment.TimeZoneID))
            TimeZoneID = Owner.TimeZonesProvider.OperationTimeZone.TimeZoneId;
        else
            TimeZoneID = Appointment.TimeZoneID;
    }
 
    private void PopulateTimeZonesDropDown()
    {
        TimeZonesDropDown.DataSource = Owner.TimeZonesProvider.GetAllTimeZones();
        TimeZonesDropDown.DataTextField = "DisplayName";
        TimeZonesDropDown.DataValueField = "Id";
    }
 
    protected void BasicControlsPanel_DataBinding(object sender, EventArgs e)
    {
        AllDayEvent.Checked = IsAllDayAppointment(Appointment);
    }
 
    protected void DurationValidator_OnServerValidate(object source, ServerValidateEventArgs args)
    {
        args.IsValid = (End - Start) > TimeSpan.Zero;
    }
 
    protected void ResetExceptions_OnClick(object sender, EventArgs e)
    {
        Owner.RemoveRecurrenceExceptions(Appointment);
        OriginalRecurrenceRule.Value = Appointment.RecurrenceRule;
        ResetExceptions.Text = Owner.Localization.AdvancedDone;
    }
 
    #region Private methods
 
    private void InitializeStrings()
    {
        SubjectValidator.ErrorMessage = Owner.Localization.AdvancedSubjectRequired;
        SubjectValidator.ValidationGroup = Owner.ValidationGroup;
 
        AllDayEvent.Text = Owner.Localization.AdvancedAllDayEvent;
 
        StartDateValidator.ErrorMessage = Owner.Localization.AdvancedStartDateRequired;
        StartDateValidator.ValidationGroup = Owner.ValidationGroup;
 
        StartTimeValidator.ErrorMessage = Owner.Localization.AdvancedStartTimeRequired;
        StartTimeValidator.ValidationGroup = Owner.ValidationGroup;
 
        EndDateValidator.ErrorMessage = Owner.Localization.AdvancedEndDateRequired;
        EndDateValidator.ValidationGroup = Owner.ValidationGroup;
 
        EndTimeValidator.ErrorMessage = Owner.Localization.AdvancedEndTimeRequired;
        EndTimeValidator.ValidationGroup = Owner.ValidationGroup;
 
        DurationValidator.ErrorMessage = Owner.Localization.AdvancedStartTimeBeforeEndTime;
        DurationValidator.ValidationGroup = Owner.ValidationGroup;
 
        ResetExceptions.Text = Owner.Localization.AdvancedReset;
 
        SharedCalendar.FastNavigationSettings.OkButtonCaption = Owner.Localization.AdvancedCalendarOK;
        SharedCalendar.FastNavigationSettings.CancelButtonCaption = Owner.Localization.AdvancedCalendarCancel;
        SharedCalendar.FastNavigationSettings.TodayButtonCaption = Owner.Localization.AdvancedCalendarToday;
    }
 
    private void InitializeRecurrenceEditor()
    {
        AppointmentRecurrenceEditor.SharedCalendar = SharedCalendar;
        AppointmentRecurrenceEditor.Culture = Owner.Culture;
        AppointmentRecurrenceEditor.StartDate = Appointment.Start;
        AppointmentRecurrenceEditor.EndDate = Appointment.End;
    }
 
    private void UpdateResetExceptionsVisibility()
    {
        // Render the reset exceptions checkbox when using web service binding
        if (string.IsNullOrEmpty(Owner.WebServiceSettings.Path))
        {
            ResetExceptions.Visible = false;
            RecurrenceRule rrule;
            if (RecurrenceRule.TryParse(Appointment.RecurrenceRule, out rrule))
            {
                ResetExceptions.Visible = rrule.Exceptions.Count > 0;
            }
        }
    }
 
    private bool IsAllDayAppointment(Appointment appointment)
    {
        DateTime displayStart = Owner.UtcToDisplay(appointment.Start);
        DateTime displayEnd = Owner.UtcToDisplay(appointment.End);
        return displayStart.CompareTo(displayStart.Date) == 0 && displayEnd.CompareTo(displayEnd.Date) == 0;
    }
 
    #endregion
 
/** can ignore this.. just me testing how to get the value for patients **/
    protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string KeyID = (RadGrid1.SelectedItems[0] as GridDataItem).GetDataKeyValue("Account_Number").ToString();
 
        string name = (RadGrid1.SelectedItems[0] as GridDataItem)["FirstName"].Text.Trim() + " " +
                      (RadGrid1.SelectedItems[0] as GridDataItem)["LastName"].Text.Trim();
 
        (ResPatient.FindControl("ResourceValue") as RadComboBox).SelectedValue = KeyID;
        SubjectText.Text = name;
        SubjectText.ReadOnly = true;
 
    }
}

RadScheduler code:
<telerik:RadScheduler runat="server" ID="RadScheduler1"
                StartEditingInAdvancedForm="true" StartInsertingInAdvancedForm="True"
                Height="1000px" WorkDayEndTime="18:00:00" MinutesPerRow="15" SelectedView="WeekView" HoursPanelTimeFormat="t"
                GroupBy="Physician" ShowAllDayRow="False" OnClientAppointmentCreated="OnClientAppointmentCreated"
                OnClientAppointmentDoubleClick="hideTooltip" OnClientAppointmentContextMenu="hideTooltip"
                OnClientAppointmentClick="OnClientAppointmentClick" OnClientRequestSuccess="OnClientRequestSuccess"
                OnClientAppointmentsPopulating="OnClientAppointmentsPopulating"
                OnClientAppointmentContextMenuItemClicked="OnClientAppointmentContextMenuItemClicked"
                OnClientAppointmentEditing="OnClientAppointmentEditing"
                OnClientAppointmentMoveStart="OnClientAppointmentMoveStart">
                <WebServiceSettings Path="Services/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" />
                <AdvancedForm Modal="True" />
              
                <AdvancedInsertTemplate>
                    <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert"
                        Subject='<%# Bind("Subject") %>'
                        Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                        Patient='<%# Bind("Patient") %>' Facility='<%# Bind("Facility") %>'
                        ApptType='<%# Bind("ApptType") %>' Physician='<%# Bind("Physician") %>' />
                </AdvancedInsertTemplate>
 
                <TimeSlotContextMenus>
                    <telerik:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server">
                        <Items>
                            <telerik:RadMenuItem Text="New Appointment" Value="CommandAddAppointment" />
                        </Items>
                    </telerik:RadSchedulerContextMenu>
                </TimeSlotContextMenus>
                <AppointmentContextMenus>
                    <telerik:RadSchedulerContextMenu runat="server" ID="ContextMenu1">
                        <Items>
                            <telerik:RadMenuItem Text="Edit" Value="CommandEdit" />
                            <telerik:RadMenuItem Text="Delete" Value="CommandDelete" />
                            <telerik:RadMenuItem IsSeparator="True" />
                            <telerik:RadMenuItem Text="Visit Details" Value="CommandDetails" />
                        </Items>
                    </telerik:RadSchedulerContextMenu>
                </AppointmentContextMenus>
                
                <WeekView DayEndTime="17:00:00" DayStartTime="09:00:00" WorkDayStartTime="09:00:00" />
                <DayView WorkDayEndTime="18:00:00" />
                <MultiDayView WorkDayStartTime="09:00:00" />
                <AppointmentContextMenuSettings EnableDefault="True" />
                <TimeSlotContextMenuSettings EnableDefault="True" />
            </telerik:RadScheduler>
            <telerik:RadToolTip ID="RadToolTip1" runat="server" RelativeTo="Element" Position="BottomCenter"
                AutoCloseDelay="0" ShowEvent="FromCode" Width="250px">
                <div id="contentContainer" style="margin: 5px 5px 0px 5px; font-size: 12px; padding-bottom: 10px;">
                    <table>
                        <tr>
                            <td>Patient Name:
                <asp:Label ID="lblPatient" runat="server" Text="Test"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>Appointment Type:
                <asp:Label ID="lblApptType" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>Scheduled Time:
                <asp:Label ID="lblTime" runat="server" Text=""></asp:Label>
                            </td>
 
                        </tr>
                        <tr>
                            <td>Provider:
                <asp:Label ID="lblProvider" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <hr />
                    <table>
                        <tr>
                            <td>Description:
                                <asp:Label ID="lbldesc" runat="server" Text="N/A"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
            </telerik:RadToolTip>
            <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="320" Height="170"
                Animation="None" HideEvent="Default" Text="Loading..." OnAjaxUpdate="RadToolTipManager1_AjaxUpdate">
            </telerik:RadToolTipManager>
            <div style="display: none;">
            </div>
            <asp:SqlDataSource ID="SqlDataSourceSchedResourceTypes" runat="server" ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>" SelectCommand="sp_GetSchedulerResourceType" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter Name="siteid" SessionField="SiteId" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSourceSchedResourcFac" runat="server" ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>" SelectCommand="sp_GetSchedulerResourceFacilities" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter Name="siteid" SessionField="SiteId" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSourceSchedResouPHYS" runat="server" ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>"
                SelectCommand="sp_GetSchedulerResourcePhysicians" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter Name="siteid" SessionField="SiteId" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSourceSchedResourcePATs" runat="server" ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>" SelectCommand="sp_GetSchedulerResourcePatients" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter Name="siteid" SessionField="SiteId" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSourceScheduler" runat="server" ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>" SelectCommand="sp_GetSchedulerData" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter Name="siteid" SessionField="SiteId" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSourceAllPats" runat="server"
                ConnectionString="<%$ ConnectionStrings:kcMedic_Central_Connection %>"
                SelectCommand="sp_patientList" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:SessionParameter DefaultValue="C002" Name="SITE_ID_LNK" SessionField="SiteId" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
Plamen
Telerik team
 answered on 13 Aug 2013
1 answer
72 views
 Hi,

I am using the below syntax to bind source to radschedule. Day View and Month View are binding correctly, but in Timeline view, the data source is binding to first date in the view.

If you look at attached screen shots, In month View, I've a record on June 25, and when I switch to Timeline View, the same record was set on first date of the view which is June 22 instead of June 25. Any idea, where I am doing wrong here?. 

Any help is much appreciated.
 


<tel:RadScheduler runat="server" ID="rsSchedule" DataKeyField="ID" DataSubjectField="WnameSection"
                DataDescriptionField="WnameSection" DataEndField="EndTime" DataStartField="StartTime" Localization-HeaderMultiDay="Work Week"
                Skin="Office2007" OnNavigationComplete="rsSchedule_NavigationComplete" Height="900px" 
                FirstDayOfWeek="Monday" LastDayOfWeek="Saturday" SelectedView="MonthView" DayStartTime="8:00"
                CustomAttributeNames="ID,FCSID,FCS,LoadNumber,MeetingPlace,MeetingTime,CountyCode,CountyName,DistrictCode,TotalTroutToStock,StartTime,EndTime,StockingDate,stocked, ShortDescription,FullDescription,DeadlineDate,scheduletype,StockingYear,StockingRequestID,ExpenseID,WnameSection,f1"
                DayEndTime="17:00" AllowInsert="false" AllowEdit="false" AllowDelete="false"
                OnAppointmentContextMenuItemClicking="rsSchedule_AppointmentContextMenuItemClicking" ColumnWidth="3px"
                OnClientAppointmentContextMenu="appointmentContextMenu" 
                OnClientAppointmentContextMenuItemClicked="appointmentContextMenuClicked" 
                ontimeslotcreated="rsSchedule_TimeSlotCreated">
                <AdvancedForm Modal="true" EnableTimeZonesEditing="true" />
               
                <MonthView VisibleAppointmentsPerDay="5" AdaptiveRowHeight="false" />
                <DayView ShowHoursColumn="true" UserSelectable="true" EnableExactTimeRendering="true"/>
                <TimelineView UserSelectable="true" GroupingDirection="Horizontal" NumberOfSlots="6"/>               
                <WeekView ShowHoursColumn="true" UserSelectable="false" EnableExactTimeRendering="true" />               
                <AppointmentTemplate>
                    <asp:Panel ID="pnlAppointment" runat="server" Height="100%" Direction="LeftToRight"
                        BackColor='<%# PanelColor(Eval("FCSID")) %>'>
                        <div runat="server" id="att1" visible='<%# Appointment(Eval("scheduletype")) %>'>
                            <b dir="ltr" id="imageChangeType" runat="server">
                             <asp:Label ID="lblStatus" runat="server" BackColor='<%# StatusColor(Eval("stocked")) %>'
                            Height="10px" Width="20px"></asp:Label>
                             </b>
                            <br />
                            <b>
                             <asp:Label ID="Label8" runat="server" Text='<%#  Eval("FCS") %>' Font-Bold="true"></asp:Label>
                            </b>
                             <br />
                            <b style="font-weight: bold">Load #: </b>
                            <asp:Label ID="lblLoad" runat="server" Text='<%# Eval("LoadNumber") %>'></asp:Label>
                            <br />
                            <b style="font-weight: bold">Cnty:</b>
                            <asp:Label ID="lblcounty" runat="server" Text='<%# Eval("CountyCode")  %>'></asp:Label>
                            <br />
                            <b style="font-weight: bold">WCO:</b>
                            <asp:Label ID="lbldistricts" runat="server" Text='<%# Eval("DistrictCode") %>'></asp:Label>
                              <asp:Label ID="Label1" runat="server" Text='<%# String.Format("{0:t}" ,Convert.ToDateTime(Eval("StartTime")))  %>'></asp:Label>                       
                            <br />
                            <b style="font-weight: bold"># Fish:</b>
                            <asp:Label ID="lblTotoalFish" runat="server" Text='<%# String.Format("{0:N0}", Convert.ToInt32(Eval("f1")))%>'></asp:Label>                                                   
                        </div>
                        <div runat="server" id="divDeadlines" visible='<%# Deadline(Eval("scheduletype")) %>'>
                            <b>Deadline</b> <b>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("ShortDescription") + "-" + "Stocking Year:" + Eval("StockingYear")  %>'></asp:Label>
                            </b>
                            <br />
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("FullDescription") %>'></asp:Label>
                        </div>
                    </asp:Panel>
                </AppointmentTemplate>
                <AppointmentContextMenus>
                    <tel:RadSchedulerContextMenu ID="radschContextMenu" runat="server">
                        <Items>
                            <tel:RadMenuItem Text="e1" />
                            <tel:RadMenuItem Text="Post Stocking" />
                            <tel:RadMenuItem Text="Add Post Stocking" />
                        </Items>
                    </tel:RadSchedulerContextMenu>
                </AppointmentContextMenus>
            </tel:RadScheduler>
Plamen
Telerik team
 answered on 13 Aug 2013
5 answers
158 views
Hi,

Is there any way I can use a template field or something similar so that I can have a custom formatted entry above the group.  I can do this by adding a single entry into the select fields of the group by GroupByExpression object.. and then changing the format string to include a table with the format I need..

The problem with this is that I only have access to one field ({0}) which is the one referenced in the FieldName of the object.. but I need access to other fields returned by the data source.

Any suggestions?

Thanks

Mike
Maria Ilieva
Telerik team
 answered on 13 Aug 2013
1 answer
83 views
Hello everyone and thanks for the responses already (:


My problems are the following:
I have a RadGrid that contains child grid, and is working perfectly, however, at the export to ExcelML I need to add a header, I use for this purpose the ExcelMLExportRowCreated checking only if it is a HeaderRow, however, and since I also have child grids, so there are multiple HeaderRows adding the header multiple times. Is there any way to check if it's masterTable or not?

In addition to this I also have a problem in formatting the child grids to pdf. To apply the style that is currently on the grid used I set  UseItemStyles = true however only works properly in the master. Is there any way to use the style applied in child grids also in the export?

Thank you

Kostadin
Telerik team
 answered on 13 Aug 2013
5 answers
556 views
hi,
i want to add a new row to the grid at the client side using a javascript code and not losing the data i inserted when i postback to the server. here is a code snippet,
ASPX
<dnn:DNNGrid
id="grdDestinations" AutoGenerateColumns="false" CssClass="dnnGrid dnnSecurityRolesGrid" 
Runat="server" AllowPaging="True"  EnableViewState="False" PageSize="10">
<MasterTableView CommandItemDisplay="Top" DataKeyNames="ComRuleItemID">
<CommandItemTemplate>
                        <table><tr><td width="30%">
                                    <asp:HyperLink ID="cmdAddDestination" runat="server" CausesValidation="False" />
                                    when clicking on this hyperlink my custom javascript method AddNewDestination() will be called
</td></tr></table>
</CommandItemTemplate>
                <Columns>
                    <dnn:DnnGridTemplateColumn UniqueName="ComRuleActions"  >
                        <ItemTemplate>
                            <dnn:DnnImageButton runat="server" ID="Delete" CommandName="Delete" IconKey="Delete" />
                            <asp:HiddenField ID="DestinationGroupID" runat="server" />
                        </ItemTemplate>
                    </dnn:DnnGridTemplateColumn>
                    <dnn:DnnGridBoundColumn datafield="DestinationName" headertext="Destination" HeaderStyle-Width="95%"/>
                </Columns>
</MasterTableView>
<PagerStyle Mode="NumericPages" Position="Bottom"></PagerStyle>   
<ClientSettings EnablePostBackOnRowClick="true">
</ClientSettings>           
</dnn:DNNGrid> 
JavaScript
function  AddNewDestination() {
var newDestinationValue = 'This value i will get by my self from somewher';
            var masterTable = $find("<%= grdDestinations.ClientID %>").get_masterTableView();
            masterTable.insertItem(newDestinationValue);
    }
C#
protected void grdDestinations_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "PerformInsert")
            {
                //Do here my server side insertion process in grid
            }
        }
My Problem is:
1) in order to make the event grdDestinations_ItemCommand fired by calling the javascript method masterTable.insertItem(newDestinationValue) i had to set the grdDestinations.MasterTableView.IsItemInserted = true;
and this property when sitting with true, an unwanted insertion form appeared above the grid, so how i can remove this form and keeps the event firing....?
2)how can i get the data i inserted by calling the javascript masterTable.insertItem(newDestinationValue) ,in the server side is the data is passed to the server so i will be able to handle it in server side....???
3)i know that there is something wrong , if iam using the feature in a wrong way feel free to tell the right way even if i have to delete all my work.
4) thank you very much in advance.....:)))



Andrey
Telerik team
 answered on 13 Aug 2013
1 answer
223 views
I have a radlistbox, and I want to let the user select multiple items and right click and then copy, and let the user use that copied item into for example Microsoft Word, Notepad, etc ... How can I accomplish this??
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
11 answers
270 views
We have a RadGrid with a lot of columns, when we navigate with the keyboard the cursor disappear and the scrolls not moving.
Is there any way to scrolls follows de selected cell?

Thanks!
Lina
Top achievements
Rank 1
 answered on 13 Aug 2013
4 answers
233 views
My editor has an empty space at the bottom (see attached screenshot).  As far as I can tell, this only appears when autoheight is true.  I have tried clearing out the modules and changing css, all with no luck.  When I look at the editor's source in firefox using firebug I noticed that there is a newline which is causing the bottom space to exist (it is between the Wrapper table and the InsertLink div):

<div id="ctl00_cphMain_fv_reSupervisorNotes" class="RadEditor Default reWrapper" style="height: auto; width: 100%; min-height: 100px; min-width: 856px;">
<div id="ctl00_cphMain_fv_reSupervisorNotes_dialogOpener" style="display:none;">
<div class="reRibbonBarWrapper"></div>
<table id="ctl00_cphMain_fv_reSupervisorNotesWrapper" cellspacing="0" cellpadding="0" style="table-layout:auto;width:100%;height:100px;">

<div id="ctl00_cphMain_fv_reSupervisorNotes_InsertLink" class="reInsertLinkWrapper" style="display: none;">
<table class="reControlsLayout" cellspacing="0" cellpadding="0" border="0">
</div>
<input id="ctl00_cphMain_fv_reSupervisorNotes_ClientState" type="hidden" name="ctl00_cphMain_fv_reSupervisorNotes_ClientState" autocomplete="off">
</div>


Here is my editor declaration:

<telerik:RadEditor
    ID="reSupervisorNotes" runat="server"
    EditModes="Design" ContentAreaMode="Div" NewLineMode="P"
    ToolsFile="~/App_Data/RadEditor/Tools.xml" ToolbarMode="ShowOnFocus"
    AutoResizeHeight="true" Height="100px" Width="100%"
    Content="<%# Bind('SupervisorNotes') %>"
    OnClientLoad="RadEditorOnClientLoad">
    <Languages>
        <telerik:SpellCheckerLanguage Code="en-GB" Title="English UK" />
    </Languages>
</telerik:RadEditor>

And here is my tools file:

<?xml version="1.0" encoding="utf-8" ?>
<root>
    <modules>
        <module name="RadEditorHtmlInspector" enabled="false" visible="false" dockingzone="bottom" />
        <module name="RadEditorNodeInspector" enabled="false" visible="false" dockingzone="bottom" />
        <module name="RadEditorDomInspector" enabled="false" visible="false" dockingzone="bottom" />
        <module name="RadEditorStatistics" enabled="false" visible="false" dockingzone="bottom" />
    </modules>
    <tools>
        <tool name="Bold" shortcut="CTRL+B"/>
        <tool name="Italic" shortcut="CTRL+I"/>
        <tool name="Underline" shortcut="CTRL+U"/>
        <tool separator="true"/>
        <tool name="ForeColor"/>
        <tool name="BackColor"/>
        <tool separator="true"/>
        <tool name="JustifyLeft"/>
        <tool name="JustifyCenter"/>
        <tool name="JustifyRight"/>
        <tool separator="true"/>
        <tool name="Indent"/>
        <tool name="Outdent"/>
        <tool separator="true"/>
        <tool name="InsertOrderedList"/>
        <tool name="InsertUnorderedList"/>
        <tool separator="true"/>
        <tool name="InsertLink" shortcut="CTRL+K"/>
        <tool name="InsertSymbol"/>
    </tools>
    <tools name="DropdownToolbar">
        <tool name="FontName"/>
        <tool name="RealFontSize" text="Size"/>
    </tools>
    <tools enabled="true">
        <tool name="Undo" shortcut="CTRL+Z"/>
        <tool name="Redo" shortcut="CTRL+Y"/>
        <tool separator="true"/>
        <tool name="Cut" shortcut="CTRL+X"/>
        <tool name="Copy" shortcut="CTRL+C"/>
        <tool name="Paste" shortcut="CTRL+V"/>
        <tool separator="true"/>
        <tool name="Print" shortcut="CTRL+P"/>
        <tool name="FindAndReplace" shortcut="CTRL+F"/>
        <tool name="SelectAll" shortcut="CTRL+A"/>
        <tool separator="true"/>
        <tool name="AjaxSpellCheck" shortcut="F7"/>
        <tool name="ToggleScreenMode" shortcut="F11"/>
    </tools>
 
</root>
Ianko
Telerik team
 answered on 13 Aug 2013
1 answer
217 views

Hello,

I want to check Remove of RadAsyncUpload is clicked or not to set textbox(ruFakeInput) width according to that condition.

My script is

$telerik.$(document).ready(function() {
               setTimeout(function() {
                   var btnRemove = document.getElementById("<%= btnRomovePhoto.ClientID %>");
                   if (btnRemove) {
                       $('input.ruFakeInput').css("width", "120px");
 
                   }
                   else {
                       $('input.ruFakeInput').css("width", "191px");
 
                   }                   
 
                  //here i check .ruRemove is clicked or not and set 'ruFakeInput' width
 
               }, 200);
           });

i try this way

$telerik.$("button [name=RowRemove]").click(function() {
 
            alert('click');
 
            });

and

$telerik.$(".RadUpload .ruRemove").click(function() {
 
alert('click');//here set $('input.ruFakeInput').css("width""120px");
 
});


but its not working. Any solution?
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
3 answers
113 views
Hi

How can I display an ajax loading icon until the navigateurl is completely loaded in the radwindow?

Thanks
Saravanan
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?