Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
176 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
54 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
280 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
177 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
94 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
178 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
99 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
580 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
249 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?