Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
137 views
Hi,
I am using a treeView with LoadonDemand using a webservice-method. And I want to do drag&drop.
- When I drag a node and insert it into a node that has been already expanded it works perfect (I think after expanding a node once, it gets the ExpandMode = clientside).
- When I drag a node and hover the targetNode, wait till it has expanded and then release the mouse button to complete the drag and drop process, it works (because the targetNode is expanded now).
- When I drag a node onto a targetNode and release the mouse button before the targetNode has been expanded I get an script Error.

Can someone help me out here?
Plamen
Telerik team
 answered on 13 Aug 2013
10 answers
334 views
I have a couple of labels on the page that I need to update periodically via Ajax. When RadAjaxManager is used to included them in an Ajax call, they are wrapped in a div. Once this happens the layout of the page is broken as they were originally spans. <edit>I'm guessing this has to do with them being wrapped with UpdatePanels, but how do I work around this?</edit> I guess I can wrap them in a panel to fix this. (slaps forhead).

Not only that, if they are configured to be updated by multiple controls, they will be wrapped by more than one div with the same id. Is this the correct behaviour?
Maria Ilieva
Telerik team
 answered on 13 Aug 2013
5 answers
213 views
Hello

If you want reproduce the bug, you must to add a RadEditor in the RadWindow.
When you get the content of the radeditor1 with your javascript we have Two <br/>
And in the Radeditor2 we Have on <br/>
You can see to choose HTML view.

I don't attach files on the thread but i can you send by mail a webform test.aspx

You see the code html on follow.

<form id="form1" runat="server">
  <div>
      <asp:ScriptManager ID="Sc1" runat="server"></asp:ScriptManager>
      <telerik:RadWindow ID="RadWindow1" Width="1000" Height="800" OnClientShow="OnClientShow" runat="server" VisibleOnPageLoad="true">
          <ContentTemplate>
              <div id="editorWrapper" style="padding: 5px; display: none;">
                  RADEDITOR WITH JAVASCRIPT, See the HTML
                  <telerik:RadEditor ID="RadEditor1" runat="server" height="200px"></telerik:RadEditor>
              </div>
              RADEDITOR WITHOUT JAVASCRIPT, See the HTML
              <telerik:RadEditor ID="RadEditor2" runat="server" height="200px"></telerik:RadEditor>
           
              <asp:button runat="server" ID="btn_save" Text="save" onclick="btn_save_Click"/>
 
              <asp:TextBox runat="server" ID="TextBox1" Width="150px"></asp:TextBox>
              <asp:TextBox runat="server" ID="TextBox2" Width="150px"></asp:TextBox>
          </ContentTemplate>
      </telerik:RadWindow>
 
      <script type="text/javascript">
          function OnClientShow(sender, args) {
              // Fix the size problem in IE.
              var editorParent = $get('editorWrapper');
              editorParent.style.display = '';
              // Fixes the problem with the content area in FF and Safari
              var editor = $find('<%= RadWindow1.ContentContainer.FindControl("RadEditor1").ClientID %>');
              editor.onParentNodeChanged();
              var style = editor.get_contentArea().style;
              style.backgroundImage = "none";
              style.backgroundColor = "white";
          }
      </script>
  </div>
  </form>

You see the code CS on follow :

public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.RadEditor1.Content="hello 1";
            this.RadEditor2.Content="hello 2";
 
            this.TextBox1.Text = "";
            this.TextBox2.Text = "";
 
        }
 
        protected void btn_save_Click(object sender, EventArgs e)
        {
            this.TextBox1.Text = this.RadEditor1.Content;
            this.TextBox2.Text = this.RadEditor2.Content;
        }
 
    }

Ianko
Telerik team
 answered on 13 Aug 2013
7 answers
778 views
Hello,

I have a hierarchical RadGrid with a MasterTableView and DetailTables. In order to only allow only one EditForm form visible at a time, I have added the following code to clear any outstanding add or edit form.
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
    {
 
        //Clear and reset all outstanding edit form
        e.Item.OwnerTableView.IsItemInserted = false;
        e.Item.OwnerTableView.ClearEditItems();
        e.Item.OwnerTableView.ClearChildEditItems();
The above code will prevent multiple outstanding add/edit forms where clicking on one insert/update will also automatically validate the other outstanding form (see attached picture). Is there a way to prevent this?

Unfortunately, after adding the above code, none of the grid events (see below) is fired. I was unable to add or update any item after clicking the Insert or Update link.

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
    OnNeedDataSource="RadGrid1_NeedDataSource"
    OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
    OnInsertCommand="RadGrid1_InsertCommand"
    OnUpdateCommand="RadGrid1_UpdateCommand"
    OnDeleteCommand="RadGrid1_DeleteCommand"
    OnEditCommand="RadGrid1_EditCommand"
     OnItemCreated="RadGrid1_ItemCreated"
     OnItemDataBound="RadGrid1_ItemDataBound"
      OnItemCommand="RadGrid1_ItemCommand"
       OnPreRender="RadGrid1_OnPreRender"
    >
This is a show stopper for us. Your help is greatly appreciated. I can provide the complete source code if needed.

Thank you.
Andrey
Telerik team
 answered on 13 Aug 2013
2 answers
513 views
Hello team,

I am having one small issue. I have a save button on my aspx page. I want to redirect to the previous page after a successful save operation, But before redirecting I want to show an alert message saying 'Service Engineer Notified.'
I have used radalert before response.redirect call, but it is not showing the radalert message and directly redirecting to the previous page.
I don't want to modify the radalert template.
What can be done?
Kavita
Top achievements
Rank 1
 answered on 13 Aug 2013
5 answers
164 views

We ran in to an issue with page size combobox events being null in Rad Ajax when paging is enabled with mode.
Error at:

 

 

$removeHandler=Sys.UI.DomEvent.removeHandler=

function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b<g;b++)if(c[b].handler===f){d=c[b].browserHandler;break}if(a.removeEventListener)a.removeEventListener(e,d,false);else if(a.detachEvent)a.detachEvent("on"+e,d);c.splice(b,1)};
Microsoft JScript runtime error: '_events' is null or not an object.

Here is the code we are using..
Menu.XML:

<?xml version="1.0" encoding="utf-8" ?>
<Menu>
  <Group Flow="Horizontal">
    <Item  Text="Home" NavigateUrl="~/Default.aspx">
    </Item>
    <Item IsSeparator="True" />
    <Item  Text="Help" ></Item>
  </Group>
</Menu>

MasterPage.aspx


<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" method="post" runat="server" style="height: 100%;" enctype="multipart/form-data">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="True"
        OutputCompression="Forced">
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <telerik:RadSkinManager ID="RadSkinManager1" Skin="Office2007" runat="server" />
    <div style="width: 99%; height: 15%; float: left; padding-left: 1%;" class="body">
        <table width="100%">
            <tr>
                <td align="left">
                    <asp:ContentPlaceHolder ID="ContentPageMenu" runat="server">
                        <div style="width: 100%; padding-bottom: 4px; padding-top: 3px; float: left;">
                            <asp:UpdatePanel ID="UpdPanelPageContainerHeader" runat="server" UpdateMode="Always">
                                <ContentTemplate>
                                    <telerik:RadMenu runat="server" ID="RadMainMenu" DataFieldID="ID" Skin="Office2007"
                                        CssClass="menu" DataFieldParentID="ParentID" EnableRoundedCorners="true" EnableShadows="true">
                                        <DataBindings>
                                            <telerik:RadMenuItemBinding Depth="0" TextField="Text" Value="Key" />
                                            <telerik:RadMenuItemBinding Depth="1" ImageUrlField="ImageUrl" TextField="Text" />
                                        </DataBindings>
                                    </telerik:RadMenu>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </asp:ContentPlaceHolder>
                </td>
                <td align="right" style="vertical-align: top;">
                              Welcome <asp:Label ID="LblUName"
                        runat="server" ForeColor="Blue" Text="Indira"></asp:Label>   <asp:Label
                            ID="LblSystem" runat="server" Text="" ForeColor="Blue"></asp:Label>   
                    <span style="color: Blue; font-size: 9pt; color: Black;" id="dt"></span>
                </td>
            </tr>
        </table>
    </div>
    <div style="width: 95%; height: 85%; float: left; padding-left: 5%;" class="body">
        <table style="border: solid 1px white; height: 100%" cellpadding="0" cellspacing="0"
            width="100%">
            <tr>
                <td>
                    <asp:ContentPlaceHolder ID="ContentPage" runat="server">
                    </asp:ContentPlaceHolder>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

MasterPage.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetExpires(DateTime.Now.AddDays(-1)); 
        if (!IsPostBack)
        {
            this.RadMainMenu.LoadContentFile("~/resources/Menu.xml");
        }        
  
    }
}

DemoUserControl.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DemoUserControl.ascx.cs" Inherits="controls_DemoUserControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadAjaxManager ID="RadAjaxManagerSCRList" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGridSCRList">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGridSCRList" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxPanel ID="PanelSCRList" runat="server">
</telerik:RadAjaxPanel>
<asp:Label ID="LblErrorMessage" runat="server" ForeColor="Red" Visible="false"></asp:Label><br />
<asp:Label ID="LblHeader" runat="server" Text="Change Requests:" Font-Bold="true"></asp:Label>
<telerik:RadGrid ID="RadGridSCRList" runat="server" Skin="Office2007" AutoGenerateColumns="false"
    PageSize="5" Width="75%" AllowPaging="true"  AllowSorting="true"
    PagerStyle-Mode="NextPrevAndNumeric" PagerStyle-Position="Top" PagerStyle-HorizontalAlign="Center"
    OnNeedDataSource="RadGridSCRList_NeedDataSource">
    <MasterTableView Name="SCRListMasterTable"
        runat="server" EnableViewState="true" AllowNaturalSort="false" ShowHeadersWhenNoRecords="true"
        CommandItemDisplay="Top" EditMode="InPlace" NoMasterRecordsText="" GroupLoadMode="Client">        
        <Columns>
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="LinkButton"
                EditText="View" ItemStyle-Width="5%">
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn UniqueName="Name" HeaderText="SCR/PTR" HeaderButtonType="TextButton"
                DataField="SCR_NAME" ForceExtractValue="Always" ItemStyle-Width="13%" Groupable="true"
                 Resizable="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ChangeNumber" HeaderText="Change Number" HeaderButtonType="TextButton"
                DataField="ChangeNumberString" ForceExtractValue="Always" ItemStyle-Width="10%"
                Groupable="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="DLTName" HeaderText="DLT" ForceExtractValue="Always"
                HeaderButtonType="TextButton" DataField="DLTName" ItemStyle-Width="16%" Groupable="true"
                DataType="System.String">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="LibraryName" HeaderText="Release Library" DataField="LibraryName"
                ForceExtractValue="Always" ItemStyle-Width="21%" HeaderButtonType="TextButton"
                SortExpression="LIBRARY_INDEX asc" Groupable="true">
            </telerik:GridBoundColumn>
        </Columns>
        <GroupHeaderItemStyle BackColor="Transparent" />
    </MasterTableView>
    <SortingSettings EnableSkinSortStyles="false" />
    <ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="true" 
        EnableAlternatingItems="true" EnablePostBackOnRowClick="false">
    </ClientSettings>
</telerik:RadGrid>

DemoUserControl.ascx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.ComponentModel.Design;
using Telerik.Web;
using Telerik.Web.UI;
  
public partial class controls_DemoUserControl : System.Web.UI.UserControl
{
    public int RowSize
    {
        set;
        get;
    }
      
    protected void RadGridSCRList_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        DataRow dr;
        dt.Columns.Add(new DataColumn("SCR_NAME"));
        dt.Columns.Add(new DataColumn("ChangeNumberString"));
        dt.Columns.Add(new DataColumn("DLTName", typeof(System.String)));
        dt.Columns.Add(new DataColumn("LibraryName"));
        dt.Columns.Add(new DataColumn("LIBRARY_INDEX"));
        int rowsLength = 5;
        if (RowSize > 0)
            rowsLength = RowSize;
        for (int i = 1; i < rowsLength + 1; i++)
        {
            dr = dt.NewRow();
            dr[0] = "SCR_NAME" + i.ToString();
            dr[1] = i;
            dr[2] = "DLT_NAME" + i.ToString();
            dr[3] = "LibraryName" + i.ToString();
            dr[4] = i;
            dt.Rows.Add(dr);
        }
        this.RadGridSCRList.DataSource = dt;
    }
    public void LoadData(int Rows)
    {
        if (Rows > 0)
            this.RowSize = Rows;
        this.RadGridSCRList.Rebind();
    }
}

Demo.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Demo.aspx.cs" Inherits="views_Demo" MasterPageFile="~/MasterPage.master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/controls/DemoUserControl.ascx" TagName="SCRControl" TagPrefix="UC" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPage" Runat="Server">
        <fieldset style="float: left; display: inline-block;">
            <legend style="font-weight: bold; color: Black">Search Change Requests:</legend>
            <asp:UpdatePanel ID="UpdatePanelSCRSearch" runat="server" RenderMode="Inline" UpdateMode="Always">
                <ContentTemplate>
                    <table border="0" cellpadding="0" cellspacing="0" width="80%" style="padding-left: 18px;">
                        <tr style="height: 35px;">
                  <td  style="width: 5%; padding-top: 10px;">
                                Rows to Display<br />
                                <asp:DropDownList ID="DDLRows" runat="server" AutoPostBack="false">
                                    <asp:ListItem Text="5" Value="5" Selected ="True"></asp:ListItem>
                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                    <table border="0" cellpadding="0" cellspacing="0" width="84%" style="padding-left: 18px;">
                        <tr style="height: 25px; padding-top: 10px;">
                            <td align="right" style="padding-right: 10px;">
                                <asp:Button ID="BtnSearch" runat="server" Text="Search" OnClick="BtnSearch_Click"
                                    CausesValidation="false" />
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
        </fieldset>
        <asp:UpdatePanel ID="UpdatePanelSCRSearchResults" runat="server" UpdateMode="Conditional"
            RenderMode="Inline" ChildrenAsTriggers="false">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="BtnSearch" EventName="click" />
            </Triggers>
            <ContentTemplate>
                <asp:Label ID="LblErrorMessage" runat="server" ForeColor="Red" Visible="false"></asp:Label>
                <div id="SearchResultsDiv" runat="server" style="width: 100%; table-layout: fixed;"
                    visible="false">
                    <uc:scrcontrol id="SCRSearchList" runat="server"/>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Content>

Demo.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
public partial class views_Demo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
    protected void BtnSearch_Click(object sender, EventArgs e)
    {
        this.LblErrorMessage.Visible = false;
        this.SearchResultsDiv.Visible = true;
        this.SCRSearchList.LoadData(Convert.ToInt32(this.DDLRows.SelectedValue));
          
    }
}


 Appreciate quick response hopefully with a solution.

Thanks!

Maria Ilieva
Telerik team
 answered on 13 Aug 2013
1 answer
50 views
Hello everyone,

I want to Show My own Customized HTML Tooltip on Mouseover of grid Cell usinng javascrpt.

can anyone help me out?

Thanks,
Marin Bratanov
Telerik team
 answered on 13 Aug 2013
2 answers
1.7K+ views
I'm trying to implement a radcombobox with checkboxes for multiselection. I'm using an ItemTemplate with an asp:CheckBox.

The data is populated fine but the functionality I'm trying to acheive is:

-The user should be able to select multiple values while the drop down is open, and then as soon as the drop down closes a postback to the server should happen where I have an event handler to handle the newly selected/deselected check boxes. Right now I set autopost back to true on the check box and it posts back every time there is an individual a check change. How do I fix this so it happens only when the drop down closes? (And not a client side side event, I want server side).

-Also the user should not be able to select an item in the combobox. The user should be able to check the check boxes on and off but not select a value. How do I fix this? Or if the user does select a value then the check mark should toggle on and off, not set the text of the combo box to the single selected value. (The text value should be ALL checked boxes, not just 1)


 
Nahwin
Top achievements
Rank 1
 answered on 13 Aug 2013
3 answers
274 views
I would like to load an entire list of tiles from a database. 
Is there any way to add Tiles programmatically via codebehind ( Radtilelist1.Tiles.Add ( new (radtile ....... '
or build tiles dynamically via databinding?


I did find  Databind and EnableDynamicData  methods but I could not find any documentation on how to implement that.
Any hint appreciated :)
Marin Bratanov
Telerik team
 answered on 13 Aug 2013
4 answers
164 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?