<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> <style type="text/css"> .divRadios { margin-bottom: 15px; } .background { background: url("arrows.png") no-repeat scroll 0 0 transparent; padding: 115px 0 0 0px; margin-left: 45px; } #RadTreeView1 { margin-bottom: 15px; } .divTree { float: left; width: 315px; } .schedulerPositioning { width: 960px; float: left; display: block; } </style></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" EnableAJAX="true"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadScheduler1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"> </telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"> </telerik:RadAjaxLoadingPanel> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> //<![CDATA[ //Shows whether an Appointment is inserted directly, or the //the Advanced Insert Form is opened when TreeView node is dropped on the Scheduler. var directlyInsertAppointment = true; function pageLoad() { $telerik.$('#<%=RadioButtonListChooseInsert.ClientID %>').click(radioButtonListChooseInsert_click); } function radioButtonListChooseInsert_click(radioButtonList) { //Gets the currently selected item of the RadioButtonList. var selectedItemValue = $telerik.$('#<%=RadioButtonListChooseInsert.ClientID %> input[type=radio]:checked').val(); if (selectedItemValue == "DirectInsert") { directlyInsertAppointment = true; } else { directlyInsertAppointment = false; } } function nodeDropping(sender, eventArgs) { var htmlElement = eventArgs.get_htmlElement(); var scheduler = $find('<%= RadScheduler1.ClientID %>'); if (isPartOfSchedulerAppointmentArea(htmlElement)) { //Gets the TimeSlot where an Appointment is dropped. var timeSlot = scheduler.get_activeModel().getTimeSlotFromDomElement(htmlElement); var startTime = timeSlot.get_startTime(); var endTime = new Date(startTime); //Gets all the data needed for the an Appointment, from the TreeView node. var node = eventArgs.get_sourceNode(); var text = node.get_text(); var attributes = node.get_attributes(); var duration = attributes.getAttribute("Duration"); endTime.setMinutes(endTime.getMinutes() + parseInt(duration)); var speaker = attributes.getAttribute("Speaker"); var parentValue = node.get_parent().get_value(); var category = scheduler.get_resources().getResourceByTypeAndKey("Category", parentValue); //New appointment is created. The start/end time, subject and category are set. var newAppointment = new Telerik.Web.UI.SchedulerAppointment(); newAppointment.set_start(startTime); newAppointment.set_end(endTime); newAppointment.set_subject(text + " (by " + speaker + ")"); if (category != null) { newAppointment.get_resources().add(category); } //Checks for the user's choice of the method for inserting Appointments. if (directlyInsertAppointment) { scheduler.insertAppointment(newAppointment); } else { //If Advanced Form is opened, the information from the TreeVew node is stored in a hidden input. var appointmentInfo = { subject: text, duration: duration, speaker: speaker, category: category }; var appointmentInfoSerialized = Sys.Serialization.JavaScriptSerializer.serialize(appointmentInfo); $get("<%=HiddenInputAppointmentInfo.ClientID%>").value = appointmentInfoSerialized; scheduler.showInsertFormAt(timeSlot); } } else { //The node was dropped elsewhere on the document. eventArgs.set_cancel(true); } } function isPartOfSchedulerAppointmentArea(htmlElement) { // Determines if an HTML element is part of the scheduler appointment area. // This can be either the rsContent or the rsAllDay div (in day and week view). return $telerik.$(htmlElement).parents().is("div.rsAllDay") || $telerik.$(htmlElement).parents().is("div.rsContent") } function formCreated(scheduler, args) { var mode = args.get_mode(); if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert || mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) { //Gets the value from the hidden input, and populates the Appointment's data from it. if ($get("<%=HiddenInputAppointmentInfo.ClientID%>").value != "") { var hiddenInputValue = Sys.Serialization.JavaScriptSerializer.deserialize($get("<%=HiddenInputAppointmentInfo.ClientID%>").value); if (hiddenInputValue) { var subjectObject = $find('<%= RadScheduler1.ClientID %>' + "_Form_Subject"); subjectObject.set_value(hiddenInputValue.subject + " (by " + hiddenInputValue.speaker + ")"); var startTime = $find('<%= RadScheduler1.ClientID %>' + "_Form_StartTime").get_selectedDate(); var endTime = new Date(startTime.setMinutes(startTime.getMinutes() + parseInt(hiddenInputValue.duration))); $find('<%= RadScheduler1.ClientID %>' + "_Form_EndTime").set_selectedDate(endTime); $find('<%= RadScheduler1.ClientID %>' + "_Form_ResCategory").findItemByText(hiddenInputValue.category._text).select(); } } } } //ToolTip events. //The ToolTip is activated on Appointment's click. function appointmentClick(sender, args) { var apt = args.get_appointment(); showTooltip(apt); } //The ToolTip contains: start/end time, subject and category for the clicked Appointment. function showTooltip(apt) { var tooltip = $find('<%=RadToolTip1.ClientID %>'); tooltip.set_targetControl(apt.get_element()); $get("startTime").innerHTML = "<strong>Starts on: </strong>" + apt.get_start().format("MM/dd/yyyy HH:mm"); $get("endTime").innerHTML = "<strong>Ends on: </strong>" + apt.get_end().format("MM/dd/yyyy HH:mm"); $get("subject").innerHTML = "<strong>Subject: </strong>" + apt.get_subject(); $get("category").innerHTML = "<strong>Category: </strong>" + apt.get_resources().getResourceByType("Category").get_text(); tooltip.set_text($get("contentContainer").innerHTML); setTimeout(function () { tooltip.show(); }, 20); } function hideTooltip() { setTimeout(function () { var activeTooltip = Telerik.Web.UI.RadToolTip.getCurrent(); if (activeTooltip) { activeTooltip.hide(); } }, 50); } function appointmentMoving(sender, args) { hideTooltip(); } //]]> </script> </telerik:RadScriptBlock> <div> <div class="divRadios"> <span><strong>Choose a Method to Insert an Appointment</strong></span> <asp:RadioButtonList ID="RadioButtonListChooseInsert" runat="server" RepeatDirection="Vertical"> <asp:ListItem Text="Directly insert an appointment" Value="DirectInsert" Selected="true"></asp:ListItem> <asp:ListItem Text="Use advanced form to insert an appointment" Value="AdvancedInsert"></asp:ListItem> </asp:RadioButtonList> </div> <div class="background"> </div> <div class="divTree"> <span><strong>Drag a Node to the Scheduler</strong></span> <telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="True" Width="340px" OnClientNodeDropping="nodeDropping"> <Nodes> <telerik:RadTreeNode Value="1" Text="Technology" AllowDrag="false" Expanded="true"> <Nodes> <telerik:RadTreeNode Text="A prosthetic arm that 'feels'" Speaker="Todd Kuiken" Duration="90" /> <telerik:RadTreeNode Text="Wireless data from every light bulb" Speaker="Harald Haas" Duration="50" /> <telerik:RadTreeNode Text="Beware conflicts of interest" Speaker="Dan Ariely" Duration="60" /> <telerik:RadTreeNode Text="Can we make things that make themselves?" Speaker="Skylar Tibbits" Duration="40" /> </Nodes> </telerik:RadTreeNode> <telerik:RadTreeNode Value="2" Text="Science" AllowDrag="false"> <Nodes> <telerik:RadTreeNode Text="Finding life we can't imagine" Speaker="Christoph Adami" Duration="70"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="The real reason for brains" Speaker="Daniel Wolpert" Duration="80"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="Making matter come alive" Speaker="Lee Cronin" Duration="90"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="Finding planets around other stars" Speaker="Lucianne Walkowicz" Duration="50"> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeNode> <telerik:RadTreeNode Value="3" Text="Business" AllowDrag="false"> <Nodes> <telerik:RadTreeNode Text="3 things I learned while my plane crashed" Speaker="Ric Elias" Duration="70"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="The surprising math of cities and corporations" Speaker="Geoffrey West" Duration="60"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="How the market can keep streams flowing" Speaker="Rob Harmon" Duration="50"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="How to use experts -- and when not to" Speaker="Noreena Hertz" Duration="90"> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeNode> <telerik:RadTreeNode Value="4" Text="Entertainment" AllowDrag="false"> <Nodes> <telerik:RadTreeNode Text="On being just crazy enough" Speaker="Joshua Walters" Duration="70"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="A flirtatious aria" Speaker="Danielle de Niese" Duration="60"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="A history of the universe in sound" Speaker="Honor Harger" Duration="80"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="The magic of truth and lies (and iPods)" Speaker="Marko Tempest" Duration="50"> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeNode> <telerik:RadTreeNode Value="5" Text="Global Issues" AllowDrag="false"> <Nodes> <telerik:RadTreeNode Text="We can recycle plastic" Speaker="Mike Biddle" Duration="50"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="Learning from a barefoot movement" Speaker="Bunker Roy" Duration="40"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="How the economic inequality harms societies" Speaker="Rickard Wilkinson" Duration="70"> </telerik:RadTreeNode> <telerik:RadTreeNode Text="Ending hunger now" Speaker="Josette Sheeran" Duration="30"> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeNode> </Nodes> <CollapseAnimation Duration="100" Type="OutQuint" /> <ExpandAnimation Duration="100" /> </telerik:RadTreeView> </div> <div class="schedulerPositioning"> <telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server"> <telerik:RadScheduler runat="server" ID="RadScheduler1" StartInsertingInAdvancedForm="true" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" OnClientAppointmentClick="appointmentClick" OnClientAppointmentMoving="appointmentMoving" OnClientFormCreated="formCreated" EnableDescriptionField="true" OverflowBehavior="Auto"> <AdvancedForm Modal="true"></AdvancedForm> </telerik:RadScheduler> <input id="HiddenInputAppointmentInfo" name="HiddenInputAppointmentInfo" type="hidden" runat="server"> </telerik:RadAjaxPanel> <telerik:RadToolTip ID="RadToolTip1" runat="server" RelativeTo="Element" Position="BottomCenter" AutoCloseDelay="0" ShowEvent="FromCode" Width="250px"> <div id="contentContainer"> <div id="startTime"> </div> <div id="endTime"> </div> <div id="subject"> </div> <div id="category"> </div> </div> </telerik:RadToolTip> </div> </div></asp:Content>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Web.UI;public partial class Test : System.Web.UI.Page{ private const string ProviderSessionKey = "Telerik.Web.Examples.Scheduler.XmlSchedulerProvider.DefaultCS"; protected void Page_Load(object sender, EventArgs e) { if (Session.Count == 0 || Session["Login"] == null || Session["Login"].ToString() == "No") { Response.Redirect("Login.aspx"); } }}<telerik:RadTileList ID="tllReporting" runat="server" Skin="FriskaMetro" EnableEmbeddedSkins="False" Height="500px"> <Groups> <%--Sales--%> <telerik:TileGroup> <Tiles> <telerik:RadContentTemplateTile NavigateUrl="Sales/CombinedSales.aspx" Shape="Square" Name="tileSalesCombined"> <ContentTemplate> <div class="SlidePanel" style="width: 100%; height: 80px"> <h1> Combined Sales</h1> </div> <div class="SlidePanelTitle" style="width: 100%; height: 50px"> <h3> Sales</h3> </div> </ContentTemplate> <PeekTemplate> <div class="SlidePanel" style="width: 88%; height: 120px"> Report to show the combined retail and catering sales for period </div> </PeekTemplate> <PeekTemplateSettings Animation="Slide" AnimationDuration="800" Easing="easeInOutBack" ShowInterval="0" CloseDelay="5000" ShowPeekTemplateOnMouseOver="true" HidePeekTemplateOnMouseOut="true" /> </telerik:RadContentTemplateTile> <telerik:RadContentTemplateTile NavigateUrl="Sales/ProductsSoldReport.aspx" Shape="Square" Name="tileSalesProductsSold"> <ContentTemplate> <div class="SlidePanel" style="width: 100%; height: 80px"> <h1> Product <br />Sales</h1> </div> <div class="SlidePanelTitle" style="width: 100%; height: 50px"> <h3> Sales</h3> </div> </ContentTemplate> <PeekTemplate> <div class="SlidePanel" style="width: 88%; height: 120px"> Report to show the total number of products sold in a period </div> </PeekTemplate> <PeekTemplateSettings Animation="Slide" AnimationDuration="800" Easing="easeInOutBack" ShowInterval="0" CloseDelay="5000" ShowPeekTemplateOnMouseOver="true" HidePeekTemplateOnMouseOut="true" /> </telerik:RadContentTemplateTile> <telerik:RadContentTemplateTile NavigateUrl="Sales/SalesPOReceiptsReport.aspx" Shape="Wide" Name="tileSalesPOReceipts"> <ContentTemplate> <div class="SlidePanel" style="width: 100%; height: 80px"> <h1> Paid Out Receipts</h1> </div> <div class="SlidePanelTitle" style="width: 100%; height: 50px"> <h3> Sales</h3> </div> </ContentTemplate> <PeekTemplate> <div class="SlidePanel" style="width: 88%; height: 120px"> Report to show the paid out cash receipts per store </div> </PeekTemplate> <PeekTemplateSettings Animation="Slide" AnimationDuration="800" Easing="easeInOutBack" ShowInterval="0" CloseDelay="5000" ShowPeekTemplateOnMouseOver="true" HidePeekTemplateOnMouseOut="true" /> </telerik:RadContentTemplateTile> <telerik:RadContentTemplateTile NavigateUrl="Sales/SalesSummaryReport.aspx" Shape="Square" Name="tileSalesSalesSummary"> <ContentTemplate> <div class="SlidePanel" style="width: 100%; height: 80px"> <h1> Sales Summary</h1> </div> <div class="SlidePanelTitle" style="width: 100%; height: 50px"> <h3> Sales</h3> </div> </ContentTemplate> <PeekTemplate> <div class="SlidePanel" style="width: 88%; height: 120px"> Report to show the value of the sales in a period per store </div> </PeekTemplate> <PeekTemplateSettings Animation="Slide" AnimationDuration="800" Easing="easeInOutBack" ShowInterval="0" CloseDelay="5000" ShowPeekTemplateOnMouseOver="true" HidePeekTemplateOnMouseOut="true" /> </telerik:RadContentTemplateTile>
</Tiles> </telerik:TileGroup> </Groups> </telerik:RadTileList> Thenn I set the visible property as such:Is this a bug?foreach (RadBaseTile tile in tllReporting.GetAllTiles()) { tile.Visible = Authentication.HasUserPageAccess("~/Reporting/"+tile.NavigateUrl); }
<telerik:RadGrid ID="GridStaff" runat="server" ShowStatusBar="True" OnItemCommand="GridStaff_ItemCommand" OnItemUpdated="GridStaff_ItemUpdated" OnItemCreated="GridStaff_ItemCreated" OnUpdateCommand="GridStaff_UpdateCommand" OnItemInserted="GridStaff_ItemInserted" OnInsertCommand="GridStaff_InsertCommand" OnPreRender="GridStaff_PreRender" AutoGenerateColumns="False" PageSize="20" AllowSorting="True" AllowAutomaticInserts="True" AllowPaging="True" DataSourceID="SqlDataSourceStaff" AllowAutomaticDeletes="true" OnItemDataBound="GridStaff_ItemDataBound" AllowAutomaticUpdates="True" Width="835px" FilterType="CheckedList" AllowFilteringByColumn="True" GridLines="None" CellSpacing="0"> <ExportSettings> <Pdf> <PageHeader> <LeftCell Text="" /> <MiddleCell Text="" /> <RightCell Text="" /> </PageHeader> <PageFooter> <LeftCell Text="" /> <MiddleCell Text="" /> <RightCell Text="" /> </PageFooter> </Pdf> </ExportSettings> <MasterTableView DataSourceID="SqlDataSourceStaff" InsertItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnFirstPage" DataKeyNames="UserID" EditMode="EditForms" AutoGenerateColumns="false" AllowMultiColumnSorting="False" Width="100%" CommandItemDisplay="Top" Name="admStaff"> <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add New Staff Member" ShowExportToPdfButton="true" /> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"> </ExpandCollapseColumn> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"> <HeaderStyle Width="20px"> </HeaderStyle> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn SortExpression="UserID" ShowFilterIcon="false" AllowFiltering="false" HeaderText="#" HeaderButtonType="TextButton" DataField="UserID" UniqueName="UserID" MaxLength="7"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="EnglishName" HeaderText="Name" HeaderButtonType="TextButton" DataField="EnglishName" UniqueName="EnglishName" MaxLength="40"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Subject" HeaderText="Subject" HeaderButtonType="TextButton" DataField="SubEn" UniqueName="Subject"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="DepEn" HeaderText="Department" HeaderButtonType="TextButton" DataField="DepartID" UniqueName="DepEn"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="Load/Week" UniqueName="TLoad" AllowFiltering="false" > <ItemStyle Width="20px" /> <ItemTemplate> <asp:Label ID="lblTeacherLoad" runat="server"></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="PhoneNumber" HeaderText="PhoneNumber" HeaderButtonType="TextButton" AllowFiltering="false" DataField="PhoneNumber" UniqueName="PhoneNumber"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="MSG" UniqueName="SendMSG" AllowFiltering="false" > <ItemStyle Width="20px" /> <ItemTemplate> <asp:ImageButton ID="img_SendMSG" runat="server" CommandName="SendMsgToStaff" ImageUrl="~/images/sendmsgicon.png" CommandArgument='<%# Bind("UserID") %>' Width="20px" Height="20px" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="SMS" UniqueName="SendSMS" AllowFiltering="false" > <ItemStyle Width="20px" /> <ItemTemplate> <asp:ImageButton ID="img_SendSMS" runat="server" CommandName="SendSmsToStaff" ImageUrl="~/images/sendsmsicon.png" CommandArgument='<%# Bind("UserID") %>' Width="20px" Height="20px" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true"> <FormTemplate> <div class="register"> <div class="divClass"> <fieldset class="rowPersonalEn"> <legend>Personal Details </legend> <p> <label>User ID </label> <asp:TextBox ID="txtUserID" CssClass="long" Text='<%# Bind("UserID") %>' Enabled="false" runat="server"></asp:TextBox> </p> <p> <label>First Name </label> <asp:TextBox ID="txtFirstNameEn" CssClass="long" Text='<%# Bind("FirstNameEn") %>' runat="server"></asp:TextBox> </p> <p> <label>Second Name </label> <asp:TextBox ID="txtSecondNameEn" CssClass="long" Text='<%# Bind("SecondNameEn") %>' runat="server"></asp:TextBox> </p> <p> <label>Family Name </label> <asp:TextBox ID="txtFamilyNameEn" CssClass="long" Text='<%# Bind("FamilyNameEn") %>' runat="server"></asp:TextBox> </p> <p> <label>Date of Birth </label> <asp:TextBox ID="txtDOB" CssClass="long" Text='<%# Bind("DOB") %>' runat="server"></asp:TextBox> </p> <p> <label>Nationality </label> <asp:DropDownList ID="ddlNationality" runat="server"> </asp:DropDownList> </p> <p> <label>ID No. </label> <asp:TextBox ID="txtIDNo" CssClass="long" Text='<%# Bind("IDNo") %>' runat="server"></asp:TextBox> </p> <p> <label>Mobile </label> <asp:TextBox ID="txtMobile" CssClass="long" Text='<%# Bind("PhoneNumber") %>' runat="server"></asp:TextBox> </p> <p> <label>Email </label> <asp:TextBox ID="txtEmail" CssClass="long" Text='<%# Bind("Email") %>' runat="server"></asp:TextBox> </p> <p> <label>Notes </label> <asp:TextBox ID="txtNotes" TextMode="MultiLine" Text='<%# Bind("Notes") %>' CssClass="multi" runat="server"></asp:TextBox> </p> </fieldset> <fieldset class="rowPersonalAr"> <legend>المعلومات الشخصية</legend> <p style="text-align:left"> <asp:TextBox ID="txtFirstNameAr" CssClass="long" Text='<%# Bind("FirstNameAr") %>' runat="server"></asp:TextBox> <label>الاسم الأول </label> </p> <p> <asp:TextBox ID="txtSecondNameAr" CssClass="long" Text='<%# Bind("SecondNameAr") %>' runat="server"></asp:TextBox> <label>الاسم الثاني </label> </p> <p> <asp:TextBox ID="txtFamilyNameAr" CssClass="long" Text='<%# Bind("FamilyNameAr") %>' runat="server"></asp:TextBox> <label>العائلة </label> </p> </fieldset> <fieldset class="rowAcademical"> <legend>Academical Information </legend> <p> <label>Degree</label> <asp:DropDownList ID="ddlAcademicDegree" runat="server" DataSourceID="DataSourceAD" DataTextField="ADEn" DataValueField="ADID" AppendDataBoundItems="true" > <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem> </asp:DropDownList> </p> <p> <label>Experience </label> <asp:TextBox ID="txtExp" CssClass="long" Text='<%# Bind("YearsOfExp") %>' runat="server"></asp:TextBox> </p> <p> <label>College/Uni. </label> <asp:TextBox ID="txtUniv" CssClass="long" Text='<%# Bind("CollegeName") %>' runat="server"></asp:TextBox> </p> <p> <label>Department</label> <asp:DropDownList ID="ddlDept" runat="server" DataSourceID="DataSourceDepartments" DataTextField="DepartmentEn" DataValueField="DepartmentID" AppendDataBoundItems="true" > <asp:ListItem Selected="True" Text="Select" Value="0" > </asp:ListItem> </asp:DropDownList> </p> <p> <label>Stage</label> <asp:DropDownList ID="ddlStage" runat="server" DataSourceID="DataSourceStages" DataTextField="StageEn" DataValueField="StageID" AppendDataBoundItems="true"> <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem> </asp:DropDownList> </p> <p> <label>Subject</label> <asp:DropDownList ID="ddlSubject" runat="server" DataSourceID="DataSourceSubjects" DataTextField="SubEn" DataValueField="SubID" AppendDataBoundItems="true"> <asp:ListItem Selected="True" Text="Select" Value="0"></asp:ListItem> </asp:DropDownList> </p> <p> <label>Hired Date</label> <asp:TextBox ID="txtHireDate" CssClass="long" Text='<%# Bind("HiredDate") %>' runat="server"></asp:TextBox> </p> </fieldset> <div> <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName="Update"> </asp:Button> <asp:Button ID="btnCancel" Text="Close" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </div> </div> </div> </FormTemplate> </EditFormSettings> <BatchEditingSettings EditType="Cell" /> <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" /> </MasterTableView> <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" /> <FilterMenu EnableImageSprites="False"> </FilterMenu> </telerik:RadGrid><asp:SqlDataSource ID="SqlDataSourceStaff" runat="server" ConnectionString="<%$ ConnectionStrings:EschoolTestV2ConnectionString %>" SelectCommand="SELECT usr.*, usr.FirstNameEn+' '+usr.FamilyNameEn AS EnglishName, dept.DepEn AS DepartID,dept.DepID AS DeparID,sub.SubEn,sub.SubID, ad.ADEn,st.StageEn FROM AttUsers usr,AttStages st, AttAcademicalDegrees ad, AttDepartments dept, AttSubjects sub WHERE st.StageID=usr.Stage AND ad.ADID=usr.AcademicalDegree AND sub.SubID=usr.Subject AND usr.Department=dept.DepID" UpdateCommand="UPDATE AttUsers SET [FirstNameEn]=@FirstNameEn, [FirstNameAr]=@FirstNameAr, [SecondNameEn]=@SecondNameEn,[SecondNameAr]=@SecondNameAr,[FamilyNameEn]=@FamilyNameEn,[FamilyNameAr]=@FamilyNameAr,[DOB]=@DOB,[IDNo]=IDNo,[PhoneNumber]=@PhoneNumber,[Email]=@Email,[Notes]=@Notes,[YearsOfExp]=@YearsOfExp,[CollegeName]=@CollegeName,[Department]=@DeparID,[Subject]=@Subject,[AcademicalDegree]=@AcademicalDegree,[Stage]=@Stage,[HiredDate]=@HiredDate WHERE UserID=@UserID" InsertCommand="INSERT INTO AttUsers (FirstNameAr,SecondNameAr,FamilyNameAr,FirstNameEn,SecondNameEn,FamilyNameEn,DOB,IDNo,PhoneNumber,Email,Notes,YearsOfExp,CollegeName,Department,Subject,AcademicalDegree,Stage,HiredDate) VALUES (@FirstNameAr,@SecondNameAr,@FamilyNameAr,@FirstNameEn,@SecondNameEn,@FamilyNameEn,@DOB,@IDNo,@PhoneNumber,@Email,@Notes,@YearsOfExp,@CollegeName,@DeparID,@Subject,@AcademicalDegree,@Stage,@HiredDate)"> <UpdateParameters> <asp:Parameter Name="UserID" Type="String"></asp:Parameter> <asp:Parameter Name="FirstNameAr" Type="String"></asp:Parameter> <asp:Parameter Name="FirstNameEn" Type="String"></asp:Parameter> <asp:Parameter Name="SecondNameAr" Type="String"></asp:Parameter> <asp:Parameter Name="SecondNameEn" Type="String"></asp:Parameter> <asp:Parameter Name="FamilyNameAr" Type="String"></asp:Parameter> <asp:Parameter Name="FamilyNameEn" Type="String"></asp:Parameter> <asp:Parameter Name="DOB" Type="DateTime"></asp:Parameter> <asp:Parameter Name="IDNo" Type="String"></asp:Parameter> <asp:Parameter Name="PhoneNumber" Type="String"></asp:Parameter> <asp:Parameter Name="Email" Type="String"></asp:Parameter> <asp:Parameter Name="Notes" Type="String"></asp:Parameter> <asp:Parameter Name="YearsOfExp" Type="String"></asp:Parameter> <asp:Parameter Name="CollegeName" Type="String"></asp:Parameter> <asp:Parameter Name="DeparID" Type="String"></asp:Parameter> <asp:Parameter Name="Subject" Type="String"></asp:Parameter> <asp:Parameter Name="AcademicalDegree" Type="String"></asp:Parameter> <asp:Parameter Name="HiredDate" Type="DateTime"></asp:Parameter> <asp:Parameter Name="Stage" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="FirstNameAr" Type="String"></asp:Parameter> <asp:Parameter Name="FirstNameEn" Type="String"></asp:Parameter> <asp:Parameter Name="SecondNameAr" Type="String"></asp:Parameter> <asp:Parameter Name="SecondNameEn" Type="String"></asp:Parameter> <asp:Parameter Name="FamilyNameAr" Type="String"></asp:Parameter> <asp:Parameter Name="FamilyNameEn" Type="String"></asp:Parameter> <asp:Parameter Name="DOB" Type="DateTime"></asp:Parameter> <asp:Parameter Name="IDNo" Type="String"></asp:Parameter> <asp:Parameter Name="PhoneNumber" Type="String"></asp:Parameter> <asp:Parameter Name="Email" Type="String"></asp:Parameter> <asp:Parameter Name="Notes" Type="String"></asp:Parameter> <asp:Parameter Name="YearsOfExp" Type="String"></asp:Parameter> <asp:Parameter Name="CollegeName" Type="String"></asp:Parameter> <asp:Parameter Name="DeparID" Type="String"></asp:Parameter> <asp:Parameter Name="Subject" Type="String"></asp:Parameter> <asp:Parameter Name="Stage" Type="String"></asp:Parameter> <asp:Parameter Name="AcademicalDegree" Type="String"></asp:Parameter> <asp:Parameter Name="HiredDate" Type="DateTime"></asp:Parameter> </InsertParameters></asp:SqlDataSource><asp:SqlDataSource ID="DataSourceDepartments" runat="server" ConnectionString="<%$ ConnectionStrings:EschoolTestV2ConnectionString %>" SelectCommand="SELECT DepEn AS DepartmentEn, DepID AS DepartmentID FROM AttDepartments ORDER BY DepID ASC"> </asp:SqlDataSource><asp:SqlDataSource ID="DataSourceSubjects" runat="server" ConnectionString="<%$ ConnectionStrings:EschoolTestV2ConnectionString %>" SelectCommand="SELECT SubEn, SubID FROM AttSubjects ORDER BY SubID ASC"> </asp:SqlDataSource><asp:SqlDataSource ID="DataSourceAD" runat="server" ConnectionString="<%$ ConnectionStrings:EschoolTestV2ConnectionString %>" SelectCommand="SELECT ADID, ADEn FROM AttAcademicalDegrees ORDER BY ADID ASC"> </asp:SqlDataSource><asp:SqlDataSource ID="DataSourceStages" runat="server" ConnectionString="<%$ ConnectionStrings:EschoolTestV2ConnectionString %>" SelectCommand="SELECT StageID, StageEn FROM AttStages ORDER BY StageID ASC"> </asp:SqlDataSource><telerik:RadDropDownList ID="MarketDropDownList" runat="server" DefaultMessage="--Select Market--" Width="200px" DataSourceID="ddlDataSource" DataTextField="MarketName" DataValueField="MarketID"></telerik:RadDropDownList><asp:SqlDataSource ID="ddlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectingString %>" SelectCommand="Select DISTINCT MarketID, MarketName FROM vPanel_Market"></asp:SqlDataSource><telerik:RadGrid ID="radProductsGrid" runat="server" AllowPaging="true"
AllowSorting="true" AutoGenerateColumns="false" GridLines="None"
OnNeedDataSource="radProductsGrid_NeedDataSource"
OnSortCommand="radProductsGrid_SortCommand" PageSize="100"
ShowGroupPanel="false" Skin="Default">
<MasterTableView AllowCustomSorting="true" AllowMultiColumnSorting="false"AllowNaturalSort="false" AllowSorting="true" AutoGenerateColumns="false"Width="100%"><Columns><telerik:GridTemplateColumn AllowFiltering="true" HeaderText="Product ID"ReadOnly="true" UniqueName="productid"><HeaderTemplate><asp:CheckBox ID="headerCheck" runat="server"onClick="javascript:SelectDeselectAllCheckboxes(this);" /></HeaderTemplate><ItemTemplate> <%--this checkbox will populate based off of selected value in dropdown --%>
<asp:CheckBox ID="ProductInMarket" runat="server" />
<asp:HiddenField ID="ProductID" runat="server" Value="ProductID" /></ItemTemplate><ItemStyle VerticalAlign="Middle" Width="60px" /></telerik:GridTemplateColumn><telerik:GridBoundColumn AllowFiltering="true" DataField="ItemNumber"HeaderText="Item Number" ReadOnly="true" SortExpression="ItemNumber" UniqueName="ItemNumber"></telerik:GridBoundColumn><telerik:GridBoundColumn AllowFiltering="true" DataField="ProductName"HeaderText="Product Name" ReadOnly="true" SortExpression="ProductName"UniqueName="ProductName"></telerik:GridBoundColumn><telerik:GridBoundColumn AllowFiltering="true" DataField="CategoryName"HeaderText="Category Name" ReadOnly="true" SortExpression="CategoryName"UniqueName="CategoryName"></telerik:GridBoundColumn></Columns></MasterTableView>
</telerik:RadGrid>RadScheduler1_AppointmentDelete
appointments are showing in the defined colors usingRadScheduler1_AppointmentDataBound
but when i am changing the start time and end time using drag and drop with in the scheduler
RadScheduler1_AppointmentUpdate is calling and the color is not changing depending upon the above example logic.
and when ever this event is calling RadScheduler1_AppointmentDataBound is not calling
protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
int
id = (int)e.ModifiedAppointment.ID;
string duration = e.ModifiedAppointment.Duration.ToString();
string starttime = e.ModifiedAppointment.Start.TimeOfDay.ToString();
string endtime = e.ModifiedAppointment.End.TimeOfDay.ToString();
string date = e.ModifiedAppointment.Start.ToShortDateString();
int resourceId = (int)e.ModifiedAppointment.Resources.GetResourceByType("Chair").Key;
ScheduleUpdate(id, starttime, endtime, duration, date, resourceId);
//Change the appointment colors which are already closed i.e appointmetn end time less than the current time.
if (Convert.ToDateTime(e.ModifiedAppointment.End) < Convert.ToDateTime(DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString()))
{
e.Appointment.BackColor = System.Drawing.
Color.Gray;
e.Appointment.ForeColor = System.Drawing.
Color.White;
}
//Change the appointment colors which are not started i.e appointmetn start time greater than the current time.
else if (Convert.ToDateTime(e.ModifiedAppointment.Start) > Convert.ToDateTime(DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Minute.ToString()))
{
e.Appointment.BackColor = System.Drawing.
Color.Yellow;
e.Appointment.ForeColor = System.Drawing.
Color.Blue;
}
else
{
e.Appointment.BackColor = System.Drawing.
Color.Green;
e.Appointment.ForeColor = System.Drawing.
Color.White;
}
RadScheduler1.Rebind();
RadGrid1.Columns[3].Visible = true;
RadToolTipManager2.TargetControls.Clear();
RadGrid1.Rebind();
RadGrid1.Columns[3].Visible =
false;
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadScheduler1, RadScheduler1);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadScheduler1, RadToolTipManager1);
}
2.
How to restrict the users to resize the appoinments with out customizing. Is there any inbuilt property in scheduler control.
3.
ShowHoursColumn="False"
I set the property of the scheduler but its showing the vertical line . I want to remove that line. Is there any way to remove that line from GUI.
4.
In Hours Column time (08:00) is showing top of the TimeLabelSpan but i want to set to middle of the TimeLabelSpan.
5.
I added some contextMenuItems to the appointments and when ever i click on contextMenuItem its opening a new browser.
But i want to open the contextMenuItem windows as popups.
Is there any inbuilt feature to achieve this.
6.How to change the color of 2 timeslots (30 mints) after the each Appointment End Time to RED color.
7. In
RadScheduler1_AppointmentUpdate
Event i am getting the below error and data is updating correctly.
Sys.WebForms.PageRequestMangerServerErrorException: Procedure or function UpdateDetails has too many arguments specified.
How rosolve the above error.
Code:
IDataSource
dataSource = SchedulerDataSource;
DataSourceView view = dataSource.GetView("DefaultView");
IDictionary keys = new OrderedDictionary();
IOrderedDictionary data = new OrderedDictionary();
data.Add(
"UPStartTime", starttime);
data.Add(
"UPEndTime", endtime);
data.Add(
"UPDuration", duration);
data.Add(
"UPUpdatedBy", "242675");
data.Add(
"UPDate", date);
data.Add(
"UPChairId", resourceId);
data.Add(
"UPAppointmentID", id);
int j = data.Count;
view.Update(keys, data ,
new OrderedDictionary(), OnDataSourceOperationComplete);
I tried to resolve using the onupdating="SchedulerDataSource_Updating" event to remove the extra Parameters added by VS.
8.
TimeSlotContextMenus are showing when user click on resources. How to restirct it.
9.
In RadGrid there are 5 columns and i want to give sorting feature to only 2 columns in that grid but in the front end users are able to
sort using all the columns. How to restrict some columns for sorting by clicking on the grid columns.
<SortExpressions>
<telerik:GridSortExpression FieldName="TeammateName" SortOrder="Ascending" />
<telerik:GridSortExpression FieldName="Role" SortOrder="Ascending" />
</SortExpressions>
10.Please go through the attached screen and the questions about the attached screen shot are
1. How to remove the blue color in b/t the two schedulers.
2. Whenever I click on New Appointment its showing like below.
3. Whenever we are moving the appointments we are getting the below java script error.
Please Give any suggestions ASAP.
Please suggest any reference links for all the above points.
Thanks in advance.