or
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MessagesTelerik.aspx.cs" Inherits="MessagesTelerik" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function rowSelected(sender, args) { var key = args.getDataKeyValue("JobId"); var panel = $find("<%=RadXmlHttpPanel1.ClientID %>"); panel.set_value(key); } </script> </telerik:RadScriptBlock> <style type="text/css"> .divContainer { background: url('main_back.png') no-repeat; width: 100%; height: 400px; position: relative; } .divGrid, .divXmlHttpPanel { position: absolute; top: 86px; } .divXmlHttpPanel { top: 132px; left: 390px; } .rgInfoPart { display: none !important; } .title { font-size: 12px; color: #606060; } .info { color: black; font-size: 12px; } </style></head><body class="BODY"> <form id="Form2" method="post" runat="server"> <asp:ScriptManager ID="ScriptManager" runat="server" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel2" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Hay"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Hay"> </telerik:RadAjaxLoadingPanel> <div class="divContainer"> <div class="divGrid"> <telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" Width="370px" AllowSorting="True" PageSize="10" AllowPaging="True" runat="server" AutoGenerateColumns="false" GridLines="None"> <MasterTableView ClientDataKeyNames="JobId" Width="100%" Summary="RadGrid table"> <Columns> <telerik:GridBoundColumn HeaderText="Id" DataField="JobId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Name" DataField="JobName" UniqueName="Name"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <PagerStyle Mode="Slider" PageButtonCount="5" /> <ClientSettings EnableRowHoverStyle="true" Selecting-AllowRowSelect="true" ClientEvents-OnRowSelected="rowSelected"> </ClientSettings> </telerik:RadGrid> </div> <div class="divXmlHttpPanel"> <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" Value="FRANR" OnServiceRequest="XmlHttpPanel_ServiceRequest" RenderMode="Block"> <telerik:RadGrid ID="RadGrid2" Width="370px" AllowSorting="True" PageSize="10" AllowPaging="true" runat="server" OnNeedDataSource="RadGrid2_NeedDataSource" AutoGenerateColumns="false" GridLines="None"> <MasterTableView ClientDataKeyNames="JQ_ID" Width="100%" Summary="RadGrid2 table"> <Columns> <telerik:GridBoundColumn HeaderText="Id" DataField="JQ_ID" UniqueName="JQ_ID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Run time" DataField="JQ_RunTime" UniqueName="Runtime"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Duration" DataField="JQ_Duration" UniqueName="Duration"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Total messages" DataField="totOutput" UniqueName="Totalmessages"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings EnableRowHoverStyle="true" Selecting-AllowRowSelect="true" > </ClientSettings> </telerik:RadGrid> <asp:TextBox ID="txtJobId" style="visibility:hidden;" runat="server"></asp:TextBox> </telerik:RadXmlHttpPanel> </div> </div> </form></body></html>using System;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Web.UI.WebControls;using Telerik.Web.UI;public partial class MessagesTelerik : System.Web.UI.Page{ DateTime dtRunDateStart = DateTime.Now.AddMonths(-3); DateTime dtRunTimeEnd=DateTime.Now; protected void Page_Load(object sender, EventArgs e) { } protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { RadGrid1.DataSource = getDataTable(dtRunDateStart, dtRunTimeEnd); } protected void RadGrid2_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { string val = txtJobId.Text; RadGrid2.DataSource = getDataTable2(val,dtRunDateStart, dtRunTimeEnd); } public DataTable getDataTable(DateTime dtRunDateStart, DateTime dtRunTimeEnd) { string strQuery = @"select * from messages where JQ_RunTime between'" + dtRunDateStart.ToString("yyyy-MM-dd") + "' and '" + dtRunTimeEnd.ToString("yyyy-MM-dd") + "'"; DataTable dtQuery = DB.GetDataTable(strQuery); return dtQuery; } protected void XmlHttpPanel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e) { string val = e.Value; txtJobId.Text = val; System.Data.DataTable table = getDataTable2(val, dtRunDateStart, dtRunTimeEnd); RadGrid2.DataSource = table; RadGrid2.DataBind(); } private DataTable getDataTable2(string jobid, DateTime dtRunDateStart, DateTime dtRunTimeEnd) { string strQuery = @"select * from messages2 where JQ_RunTime between'" + dtRunDateStart.ToString("yyyy-MM-dd") + "' and '" + dtRunTimeEnd.ToString("yyyy-MM-dd") + "'"; DataTable dtQuery = DB.GetDataTable(strQuery); return dtQuery; }}<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Calendar.master" CodeFile"schedulersample" Inherits="schedulersample" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <table style="width: 100%;" id="tblMain"> <tr> <td> </td> <td> </td> </tr> <tr> <td width="15px"> </td> <td colspan="3" class="title" width="99%"> <div class="floatL font21"> <asp:Label ID="lblmultiuser" runat="server" Text="Multi user- "></asp:Label> <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label> </div> </td> </tr> <tr> <td> </td> <td> <hr /> </td> </tr> <tr> <td width="15px"> </td> <td style="width: 100%;"> <table> <tr> <td> <asp:HiddenField ID="hdnFldInviteUsers" runat="server" /> <asp:HiddenField ID="hdnRdSchedulerSelectedDate" runat="server" /> <asp:Label ID="lblSelectGroup" runat="server" Text="Select group :"></asp:Label> </td> <td class="style1"> <asp:DropDownList ID="ddlGroup" runat="server" Width="150px" OnSelectedIndexChanged="ddlGroup_SelectedIndexChanged" AutoPostBack="true"> </asp:DropDownList> </td> <td> <div class="buttonEnding" align="center" style="vertical-align: middle;"> <asp:Button runat="server" ID="btnCreateGroup" Text="Create group" OnClick="btnCreateGroup_Click" CssClass="button"></asp:Button> </div> </td> </tr> <tr> <td> <asp:CheckBox ID="chkWildCard" runat="server" Text="Filter users" OnCheckedChanged="chkWildCard_CheckedChanged" Checked="false" Visible="true" AutoPostBack="true" /> </td> <td class="style1"> <asp:DropDownList ID="ddlWildCard" runat="server" Enabled="false" Width="150" AutoPostBack="true"> </asp:DropDownList> </td> <td> <telerik:RadTextBox ID="txtWildCard" runat="server" Enabled="false" Width="100" Skin="Office2007"> </telerik:RadTextBox> </td> <td> <div class="buttonEnding" align="center" style="vertical-align: middle;"> <asp:Button runat="server" ID="btnFilter" Text="Filter users" OnClick="btnFilter_Click" CssClass="button"></asp:Button> </div> </td> </tr> <tr> <td> <asp:HiddenField ID="Hidden" runat="server" /> <asp:Label ID="lblSelectUsers" runat="server" Text="Select users :"></asp:Label> </td> <td class="style1"> <telerik:RadComboBox ID="rdcmbxFilter" runat="server" EmptyMessage="- Please select users -" AutoCompleteSeparator="true" HighlightTemplatedItems="true" AutoPostBack="True" AllowCustomText="true" DataTextField="FirstName" DataValueField="Id" OnClientDropDownClosing="onDropDownClosing" OnSelectedIndexChanged="rdcmbxFilter_SelectedIndexChanged" Width="150px"> <Items> </Items> <ItemTemplate> <div onclick="StopPropagation(event)"> <asp:CheckBox runat="server" ID="chkRole" Text='<%#Eval("FirstName")%>' onclick="onCheckBoxClick(this)"> </asp:CheckBox> </div> </ItemTemplate> <CollapseAnimation Duration="200" Type="OutQuint" /> <ExpandAnimation Type="OutQuart" /> </telerik:RadComboBox> </td> <td> <div class="buttonEnding" align="center" style="vertical-align: middle;"> <asp:Button runat="server" ID="btnGetDetails" Text="Get details" CssClass="button"> </asp:Button> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table width="100%"> <tr> <td width="17px"> </td> <td> <table> <tr> <td valign="top"> <telerik:RadButton ID="rdbtnuser" runat="server" ToolTip="Single User Scheduler" OnClick="rdbtnuser_Click" Width="18" Icon-PrimaryIconUrl="~/Images/1.png" Icon-PrimaryHoveredIconUrl="~/Images/11.png" Icon-PrimaryIconWidth="28" Icon-PrimaryIconHeight="21" Icon-PrimaryIconLeft="-1" Icon-PrimaryIconTop="0"> </telerik:RadButton> <telerik:RadButton ID="rdbtnMuser" runat="server" ToolTip="Multi User Scheduler" OnClick="rdbtnMuser_Click" Width="18" Icon-PrimaryIconWidth="28" Icon-PrimaryIconHeight="21" Icon-PrimaryIconLeft="-1" Icon-PrimaryIconUrl="~/Images/21.png" Icon-PrimaryIconTop="0"> > </telerik:RadButton> <telerik:RadButton ID="rdbtnDay" runat="server" ToolTip="Multi User Scheduler Day" OnClick="rdbtnDay_Click" Width="18" Icon-PrimaryIconWidth="28" Icon-PrimaryIconHeight="21" Icon-PrimaryIconLeft="-1" Icon-PrimaryIconUrl="~/Images/4.png" Icon-PrimaryHoveredIconUrl="~/Images/41.png" Icon-PrimaryIconTop="0"> </telerik:RadButton> <telerik:RadButton ID="rdbtnWeek" runat="server" ToolTip="Multi User Scheduler Week" OnClick="rdbtnWeek_Click" Width="18" Icon-PrimaryIconWidth="28" Icon-PrimaryIconHeight="21" Icon-PrimaryIconLeft="-1" Icon-PrimaryIconUrl="~/Images/5.png" Icon-PrimaryHoveredIconUrl="~/Images/51.png" Icon-PrimaryIconTop="0"> </telerik:RadButton> <telerik:RadButton ID="rdbtnMonth" runat="server" ToolTip="Multi User Scheduler Month" OnClick="rdbtnMonth_Click" Width="18" Icon-PrimaryIconWidth="28" Icon-PrimaryIconHeight="21" Icon-PrimaryIconLeft="-1" Icon-PrimaryIconUrl="~/Images/6.png" Icon-PrimaryHoveredIconUrl="~/Images/61.png" Icon-PrimaryIconTop="0"> </telerik:RadButton> <telerik:RadButton ID="rdbtnTimeLine" runat="server" Skin="Office2007" Text="TL" Visible="false"> </telerik:RadButton> </td> <td valign="middle" style="padding-top: 2px;"> <div class="buttonEnding" align="center" style="vertical-align: middle;"> <asp:Button runat="server" ID="rdbtnNewEvent" Text="Create new meeting" OnClick="rdbtnNewEvent_Click" CssClass="button"></asp:Button> </div> </td> <td> <asp:CheckBox ID="chkWeekends" runat="server" Text="Show weekends" Visible="false" AutoPostBack="true" OnCheckedChanged="chkWeekends_CheckedChanged" /> </td> </tr> </table> </td> <td> </td> </tr> <tr> <td width="17px"> </td> <td height="10px"> </td> <td> </td> </tr> <tr> <td width="17px"> </td> <td style="height:100%" colspan="4"> <telerik:RadScheduler runat="server" Height="800px" ID="RdSchMultiUsers" Skin="Office2007" CssClass="rsAllDayCell" GroupBy="Date,FirstName" StartInsertingInAdvancedForm="true" EnableDescriptionField="false" DataKeyField="ID" DisplayRecurrenceActionDialogOnMove="true" DataDescriptionField="Description" DataEndField="End" DataStartField="Start" DataSubjectField="Subject" AllowInsert="true" OnAppointmentClick="RdSchMultiUsers_AppointmentClick" OnFormCreated="RdSchMultiUsers_FormCreated" Reminders-Enabled="true" DataReminderField="Reminder" AllowEdit="false" OnResourceHeaderCreated="RdSchMultiUsers_ResourceHeaderCreated" OnAppointmentDelete="RdSchMultiUsers_AppointmentDelete" MinimumInlineFormHeight="800" OnNavigationComplete="RdSchMultiUsers_NavigationComplete" OnReminderDismiss="RdSchMultiUsers_ReminderDismiss" OnReminderSnooze="RdSchMultiUsers_ReminderSnooze" OnAppointmentUpdate="RdSchMultiUsers_AppointmentUpdate" OverflowBehavior="Expand" OnAppointmentInsert="RdSchMultiUsers_AppointmentInsert" OnAppointmentCreated="RdSchMultiUsers_AppointmentCreated" > <AdvancedForm Modal="true" /> <MonthView GroupBy="Date,FirstName" /> <Reminders Enabled="True" /> <ResourceTypes> <telerik:ResourceType KeyField="Id" Name="FirstName" TextField="FirstName" ForeignKeyField="UserID" /> </ResourceTypes> <TimelineView NumberOfSlots="1" GroupBy="FirstName,Date" GroupingDirection="Vertical" SortingMode="Global" EnableExactTimeRendering="true" UserSelectable="False"> </TimelineView> <WeekView UserSelectable="False" /> <DayView UserSelectable="False" /> <MonthView GroupBy="Date,FirstName" UserSelectable="False"></MonthView> <Reminders Enabled="True"></Reminders> <ResourceHeaderTemplate> <table id="rdschHdTable"> <tr> <td id="tduser" align="left"> <asp:CheckBox runat="server" ID="ChkUser" OnCheckedChanged="ChkUser_CheckedChanged" AutoPostBack="true" /> </td> <td align="right"> <asp:Label runat="server" ID="lblUserId" Visible="false"></asp:Label> </td> </tr> </table> </ResourceHeaderTemplate> </telerik:RadScheduler> <telerik:RadToolTipManager Height="0px" runat="server" ID="RadToolTipManager1" Position="MiddleRight" Width="280px" Animation="none" HideEvent="ManualClose" RelativeTo="Mouse" OnClientHide="OnClientHide" EnableShadow="false" RenderInPageRoot="false" AnimationDuration="250" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" Skin="Web20"> </telerik:RadToolTipManager> </td> <td> </td> </tr> </table> </td> </tr> </table> </asp:Content> protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (isMandatory) { RadTextBox1.EnabledStyle.BackColor = System.Drawing.Color.Pink; } }function RowDoubleClick(sender, eventArgs) { var tableName = eventArgs.get_tableView().get_name(); if (tableName == "Master") { var masterRowId = eventArgs.getDataKeyValue("Id"); } else { var detailRowId = eventArgs.getDataKeyValue("Id"); var parentRowId = // This needs to be the key associated with the detail table from the parent table. }}