or
<telerik:RadMaskedTextBox ID="RadMaskedTextBox2" runat="server" Text="RadMaskedTextBox2" Mask="aaaaaaaaaaaaaaaaa" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="False" width="80px" /><br /><telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Text="RadMaskedTextBox1" Mask="aaaaaaaaaaaaaaaaa" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" /><telerik:RadMaskedTextBox ID="RadMaskedTextBox2" runat="server" Text="RadMaskedTextBox2" Mask="aaaaaaaaaaaaaaaaa" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="True" width="80px" /><br /><telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Text="RadMaskedTextBox1" Mask="aaaaaaaaaaaaaaaaa" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false" /><ClientSettings EnablePostBackOnRowClick="True"> <Selecting AllowRowSelect="True"/> <Scrolling UseStaticHeaders="True" AllowScroll="True" SaveScrollPosition="True"/> <ClientEvents OnRowSelecting="rgUsers_RowSelecting"/></ClientSettings>function rgUsers_RowSelecting(sender, args) { var changed = $get("formChanged").value; if (changed > 0) { if(confirm("Your changes will be discarded. Click OK to continue.")) { $get("hfFormChanged").value = "0"; } else { args.set_cancel(true); } }}RadCalendarDay
testCal = new RadCalendarDay();
testCal.Date =
DateTime.Now;
testCal.Repeatable =
RecurringEvents.None;
testCal.ToolTip =
"SpecialDay1";
testCal.ItemStyle.CssClass =
"SpecialDay1";
CSS Definition
.SpecialDay1
{
background-color: red;
}
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvancedForm.ascx.cs" Inherits="RadSchedulerAdvancedFormAdvancedForm" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><%@ 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> <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="ResTeacher" Type="Teacher" Label="Teacher:" Skin='<%# Owner.Skin %>' /> </li> <li> <scheduler:MultipleValuesResourceControl runat="server" ID="ResStudent" Type="Student" Label="Student: " /> </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" 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> <telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" Width="400" DropDownWidth="200" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="StudentID" CssClass=""> </telerik:RadAutoCompleteBox> <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:TelerikVSXConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [StudentID], [Name] FROM [DbProvider_Students] ORDER By Name"> </asp:SqlDataSource> <telerik:RadTextBox runat="server" ID="DescriptionTexta"> </telerik:RadTextBox> <telerik:RadComboBox runat="server" AllowCustomText="true" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="StudentID"> </telerik:RadComboBox> </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> <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxPanelTimed"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelTimed" LoadingPanelID="LoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <asp:Timer runat="server" ID="UpdateTimer" Interval="40000" /> <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanelTimed" OnAjaxSettingCreating="RadAjaxPanelTimed_AjaxSettingCreating" > <telerik:RadTabStrip ID="tabSocialNetwork" runat="server" OnClientTabSelecting="OnClientTabSelecting" SelectedIndex="0" MultiPageID="radMultiPage" OnTabClick="OnRadTab_SocialAccountClick"> </telerik:RadTabStrip> <telerik:RadMultiPage ID="radMultiPage" runat="server" RenderSelectedPageOnly="true" SelectedIndex="0" Width="100%" Height="500px" OnPageViewCreated="RadMultiPage1_PageViewCreated"> </telerik:RadMultiPage> </telerik:RadAjaxPanel>CodeBehind:#region Load Event protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { objSocialNetworkBF = new SocialNetworkBF(); DataTable dtSocialAccount = objSocialNetworkBF.GetSocialAccount(compId, userId); ViewState["SocialAccount"] = dtSocialAccount; txtMessage.Attributes.Add(PureAnalyzer_WebApp.Onkeydown, PureAnalyzer_WebApp.EnterKeyPrevent); btnSendItNow.Attributes.Add(PureAnalyzer_WebApp.Onkeydown, PureAnalyzer_WebApp.EnterKeyPrevent); if (dtSocialAccount != null && dtSocialAccount.Rows.Count > 0) { foreach (DataRow dr in dtSocialAccount.Rows) { SocialAccId = dr["SocialAccId"].ToString(); SocialAccount = dr["SocialAccount"].ToString(); AddTab(dr["SocialAccountScreenName"].ToString() + PureAnalyzer_WebApp.OpenBracket + dr["SocialAccount"].ToString() + PureAnalyzer_WebApp.ClosedBracket); } // UpdateTimer.Interval = 60000; } } } #endregion #region Add radtab private void AddTab(string tabName) { RadTab tab = new RadTab(); tab.Text = tabName; //tab.PostBack = true; tab.Value = tabName + "(" + SocialAccId + ")"; tabSocialNetwork.Tabs.Add(tab); tab.ToolTip = tabName; if (flag) { AddPageView(tab); flag = false; } } #endregion #region OnRadTab click event protected void OnRadTab_SocialAccountClick(object sender, RadTabStripEventArgs e) { AddPageView(e.Tab); e.Tab.PageView.Selected = true; } #endregion #region Method to add pageview private void AddPageView(RadTab tab) { RadPageView pageView = new RadPageView(); Guid pageViewGuid; pageViewGuid = Guid.NewGuid(); string[] strAccVal = tab.Value.Split('('); pageView.ID = strAccVal[1].Remove(strAccVal[1].IndexOf(')')) + "," + strAccVal[2].Remove(strAccVal[2].IndexOf(')')) + "," + pageViewGuid.ToString(); radMultiPage.PageViews.Add(pageView); tab.PageViewID = pageView.ID; } #endregion #region Rad multipage view created int Iteration = 0; protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) { string []strPageviewID = e.PageView.ID.Split(','); if (!IsPostBack) { if (strPageviewID[0] == "Twitter") { string userControlName = "TwitterConnect.ascx"; Control userControl = Page.LoadControl(userControlName); Guid userControlTwitterGuid = Guid.NewGuid(); userControl.ID = userControlTwitterGuid.ToString() + "," + strPageviewID[1]; e.PageView.Controls.Add(userControl); } else if (strPageviewID[0] == "FaceBook") { string userControlName = "FacebookConnect.ascx"; Control userControl = Page.LoadControl(userControlName); Guid userControlFacebookGuid = Guid.NewGuid(); userControl.ID = userControlFacebookGuid.ToString() + "," + strPageviewID[1]; e.PageView.Controls.Add(userControl); } } else { if (strPageviewID[0] == "Twitter") { string userControlName = "TwitterConnect.ascx"; Control userControl = Page.LoadControl(userControlName); Guid userControlTwitterGuid = Guid.NewGuid(); userControl.ID = userControlTwitterGuid + "," + strPageviewID[1]; e.PageView.Controls.Add(userControl); Iteration++; } else if (strPageviewID[0] == "FaceBook") { string userControlName = "FacebookConnect.ascx"; Control userControl = Page.LoadControl(userControlName); Guid userControlFacebookGuid = Guid.NewGuid(); userControl.ID = userControlFacebookGuid + "," + strPageviewID[1]; e.PageView.Controls.Add(userControl); Iteration++; } } } #endregion #region RadPanel Ajaxsetting created protected void RadAjaxPanelTimed_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e) { AsyncPostBackTrigger trigger = new AsyncPostBackTrigger(); trigger.ControlID = UpdateTimer.ID; trigger.EventName = "Tick"; e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always; e.UpdatePanel.Triggers.Add(trigger); } #endregion123
123-456
123-456-789
<telerik:RadComboBox Visible="false" Skin="Vista" TabIndex="10" ID="rcbLastName" runat="server" AllowCustomText="true" Width="200px" ShowToogleImage="false" EnableOverlay="true" ShowDropDownOnTextboxClick="false" DropDownWidth="200px" MaxLength="20" CausesValidation="false" EnableLoadOnDemand="true" EnableScreenBoundaryDetection="false" ExpandDirection="Up" EnableVirtualScrolling="true" ShowMoreResultsBox="true" AutoPostBack="True" OnClientItemsRequesting="OnClientItemsRequesting" OnClientDropDownOpening="OnClientDropDownOpening" OnItemsRequested="rcbLastName_ItemsRequested" OnSelectedIndexChanged="rcbBarNumber_SelectedIndexChanged" ItemsPerRequest="5">if (!String.IsNullOrEmpty(e.Text)) { rcbLastName.ClearSelection(); NameValueCollection nvc = new NameValueCollection(); nvc.Add("LastName", e.Text); DataTable accounts = DB.ExecuteDataTable("usp_AccountsGetByLastName", nvc); int itemOffset = e.NumberOfItems; int endOffset = Math.Min(itemOffset + rcbLastName.ItemsPerRequest, accounts.DefaultView.Count); e.EndOfItems = endOffset == accounts.DefaultView.Count; for (int i = itemOffset; i < endOffset && i < accounts.DefaultView.Count; i++) { string data = accounts.DefaultView[i]["FullName"].ToString(); if (!String.IsNullOrEmpty(accounts.DefaultView[i]["Address1"].ToString())) { data += " - " + accounts.DefaultView[i]["Address1"].ToString() + " "; if (!String.IsNullOrEmpty(accounts.DefaultView[i]["Address2"].ToString())) data += accounts.DefaultView[i]["Address2"].ToString() + " "; data += accounts.DefaultView[i]["City"].ToString() + " " + accounts.DefaultView[i]["State"].ToString() + " " + accounts.DefaultView[i]["Zip"].ToString(); } rcbLastName.Items.Add(new RadComboBoxItem(data, accounts.DefaultView[i]["AccountID"].ToString())); } if (accounts.DefaultView.Count <= 0) e.Message = "No matches"; else e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, accounts.DefaultView.Count); }