or
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); }
GridDataItem dataItem = RadGrid1.MasterTableView.Items[RowNumber.Value];foreach (RadTreeNode node in e.DraggedNodes){ //AddRowToGrid(dt, node); dataItem["DocAssigned"].Text = node.Text;}<telerik:RadDockZone runat="server" ID="RadDockZone1" Orientation="Vertical" Height="300px" Width="875px" BorderStyle="None"> <telerik:RadDock runat="server" ID="RadDock1" Title="Vehicle Schedule" Height="300px" Width="875px"> <ContentTemplate> <telerik:RadGrid runat="server" ID="RadGrid1" Width="840px" Visible="true" AutoGenerateColumns="False" OnRowDrop="RadGrid1_RowDrop"> <MasterTableView Width="100%" DataKeyNames="CompletionDate,DocAssigned" ClientDataKeyNames="CompletionDate,DocAssigned"> <Columns> <telerik:GridBoundColumn UniqueName="CompletionDate" SortExpression="CompletionDate" DataField="CompletionDate" HeaderStyle-Width="85" HeaderText="Completed" DataFormatString="{0:dd/MM/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="DateDue" SortExpression="DateDue" DataField="DateDue" HeaderStyle-Width="85" HeaderText="Due" DataFormatString="{0:dd/MM/yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="AgCompanyName" SortExpression="AgCompanyName" DataField="AgCompanyName" HeaderStyle-Width="250" HeaderText="Agent"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="DocName" SortExpression="DocName" DataField="DocName" HeaderStyle-Width="150" HeaderText="Document"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="LinkedTo" SortExpression="LinkedTo" DataField="LinkedTo" HeaderStyle-Width="80" HeaderText="Linked To"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="80" HeaderText="Doc Assigned" UniqueName="DocAssigned" SortExpression="DocAssigned" DataField="DocAssigned" > </telerik:GridBoundColumn> </Columns> <NoRecordsTemplate> <div style="height: 30px; cursor: pointer;"> No outstanding documents for this vehicle </div> </NoRecordsTemplate> </MasterTableView> <ClientSettings AllowRowsDragDrop="true"> <ClientEvents OnRowMouseOver="RowMouseOver" OnRowDragStarted="OnRowDragStarted" /> <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" /> </ClientSettings> </telerik:RadGrid> </ContentTemplate> </telerik:RadDock></telerik:RadDockZone><telerik:RadDockZone runat="server" ID="unprocessedDocumentsRadDockZone" Orientation="Vertical" Height="460px" Width="875px" BorderStyle="None"> <telerik:RadDock runat="server" ID="unprocessedDocumentsRadDock" Title="Unprocessed Documents" Height="460px" Width="875px"> <ContentTemplate> <table> <tr> <td valign="top"> <telerik:RadTreeView ID="RadTreeView1" runat="server" AllowNodeEditing="false" Height="400px" Width="200px" Style="border: 1px solid #CBE7F5;" EnableDragAndDrop="true" OnClientNodeClicked="onNodeClicked" OnNodeDrop="RadTreeView1_HandleDrop" OnClientNodeDropping="onNodeDropping" OnClientNodeDragging="onTreeViewDragging" OnNodeExpand="RadTreeView1_NodeExpand"> </telerik:RadTreeView> </td> <td valign="top"> <pdfviewer:ShowPdf ID="ShowPdf1" runat="server" BorderStyle="None" BorderWidth="0px" Height="400px" Width="680px" /> </td> </tr> </table> </ContentTemplate> </telerik:RadDock></telerik:RadDockZone><telerik:RadGrid ID="radGridHistory" AllowCustomPaging="True" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" EnableHeaderContextMenu="true" EnableLinqExpressions="False" GridLines="Horizontal" GroupingEnabled="false" Visible="false" OnItemDataBound="radGridHistory_ItemDataBound" OnInit="radGridHistory_Init" OnNeedDataSource="radGridHistory_NeedDataSource" runat="server"> <GroupingSettings CaseSensitive="false" /> <MasterTableView DataKeyNames="ID" AllowFilteringByColumn="true" AllowCustomSorting="true" NoMasterRecordsText="No History records to display"> <Columns> <telerik:GridDateTimeColumn DataField="EventDate" DataFormatString="{0:MM/dd/yyyy hh:mm tt}" EnableRangeFiltering="true" EnableTimeIndependentFiltering="false" HeaderText="Date" PickerType="DatePicker" SortExpression="EventDate" UniqueName="EventDate"> </telerik:GridDateTimeColumn> </Columns> <PagerStyle AlwaysVisible="True" /> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" /> </ClientSettings> <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" /> <FilterMenu EnableImageSprites="false" /></telerik:RadGrid><telerik:RadComboBox runat="server" ID="ComboAllContacts" Width="300" ShowMoreResultsBox="true" MaxLength="250" EnableVirtualScrolling="true" EnableLoadOnDemand="true" EmptyMessage="Select Area" MarkFirstMatch="false" AllowCustomText="false" HighlightTemplatedItems="false" EnableItemCaching="false" MinFilterLength="1" CssClass="fx-areaselector" OnItemsRequested="rcboSearch_ItemsRequested" skin="Fluent" EnableEmbeddedSkins="false" DataValueField="CRMAreaID" ClientIDMode="Static" > <ItemTemplate> <div class="searchResult"> <div class="profilePicContainer"> <a title="View <%# DataBinder.Eval(Container, "Attributes['Name']")%>"><%# DataBinder.Eval(Container, "Attributes['Name']")%></a> </div> </div> <div class="separatorTemplate" style="display: none;"> <h2><%#DataBinder.Eval(Container, "Attributes['Name']")%></h2> </div> </ItemTemplate></telerik:RadComboBox>If Not IsPostBack Then Dim currentRowType = String.Empty Dim ds As DataSet = AreaHelper.GetMyAreas() Dim dt As DataTable = ds.Tables(0) ComboAllContacts.DataValueField = "CRMAreaID" For Each row As DataRow In dt.Rows Dim item As New RadComboBoxItem Dim CRMAreaID As String = row("CRMAreaID").ToString() Dim Name As String = row("Name").ToString() Dim Region As String = row("Region").ToString() If currentRowType <> Region Then ' Add separator Row ComboAllContacts.Items.Add(CreateSeparatorItem(Region)) currentRowType = Region End If item.Value = CRMAreaID.ToString() item.Text = Name item.Attributes.Add("CRMAreaID", CRMAreaID) item.Attributes.Add("Region", Region) item.Attributes.Add("Name", Name) item.Attributes.Add("IsSeparator", False) item.Attributes.Add("onclick", "NavigateAreaSelection(" + CRMAreaID + ")") If Not String.IsNullOrWhiteSpace(item.Text) Then ComboAllContacts.Items.Add(item) End If Next row ComboAllContacts.DataBind() End IfProtected Sub Protected Sub rcboSearch_ItemsRequested(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs) '' RadComboBox combo = this.FindControl("combo") as RadComboBox; ComboAllContacts.ClearSelection() ComboAllContacts.Items.Clear() ComboAllContacts.Dispose() ComboAllContacts.Text = "" Dim data As DataTable = GetData(e.Text) Dim itemOffset As Integer = e.NumberOfItems Dim endOffset As Integer = data.Rows.Count ''Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count) e.EndOfItems = endOffset = data.Rows.Count 'If data.Rows.Count > 0 Then 'End If Dim currentRowType = String.Empty ''For i As Integer = itemOffset To endOffset - 1 For Each row As DataRow In data.Rows Dim item As New RadComboBoxItem 'Dim CRMAreaID As String = data.Rows(i)("RowID").ToString() 'Dim rowName As String = data.Rows(i)("Name").ToString() 'Dim Region As String = data.Rows(i)("Region").ToString() Dim CRMAreaID As String = row("RowID").ToString() Dim rowName As String = row("Name").ToString() Dim Region As String = row("Region").ToString() If currentRowType <> Region Then ' Add separator Row ComboAllContacts.Items.Add(CreateSeparatorItem(Region)) currentRowType = Region End If item.Value = CRMAreaID item.Text = rowName item.Attributes.Add("CRMAreaID", CRMAreaID) item.Attributes.Add("Region", Region) item.Attributes.Add("Name", rowName) item.Attributes.Add("IsSeparator", False) item.Attributes.Add("onclick", "NavigateAreaSelection(" + CRMAreaID + ")") If Not String.IsNullOrWhiteSpace(item.Text) Then ComboAllContacts.Items.Add(item) End If ''Next row Next If ComboAllContacts.Items.Count > 0 Then ComboAllContacts.DataBind() Else End If e.Message = GetStatusMessage(endOffset, ComboAllContacts.Items.Count)(ByVal sender As Object, ByVal e As RadComboBoxItemsRequestedEventArgs) '' RadComboBox combo = this.FindControl("combo") as RadComboBox; ComboAllContacts.ClearSelection() ComboAllContacts.Items.Clear() ComboAllContacts.Dispose() ComboAllContacts.Text = "" Dim data As DataTable = GetData(e.Text) Dim itemOffset As Integer = e.NumberOfItems Dim endOffset As Integer = data.Rows.Count ''Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count) e.EndOfItems = endOffset = data.Rows.Count 'If data.Rows.Count > 0 Then 'End If Dim currentRowType = String.Empty ''For i As Integer = itemOffset To endOffset - 1 For Each row As DataRow In data.Rows Dim item As New RadComboBoxItem 'Dim CRMAreaID As String = data.Rows(i)("RowID").ToString() 'Dim rowName As String = data.Rows(i)("Name").ToString() 'Dim Region As String = data.Rows(i)("Region").ToString() Dim CRMAreaID As String = row("RowID").ToString() Dim rowName As String = row("Name").ToString() Dim Region As String = row("Region").ToString() If currentRowType <> Region Then ' Add separator Row ComboAllContacts.Items.Add(CreateSeparatorItem(Region)) currentRowType = Region End If item.Value = CRMAreaID item.Text = rowName item.Attributes.Add("CRMAreaID", CRMAreaID) item.Attributes.Add("Region", Region) item.Attributes.Add("Name", rowName) item.Attributes.Add("IsSeparator", False) item.Attributes.Add("onclick", "NavigateAreaSelection(" + CRMAreaID + ")") If Not String.IsNullOrWhiteSpace(item.Text) Then ComboAllContacts.Items.Add(item) End If ''Next row Next If ComboAllContacts.Items.Count > 0 Then ComboAllContacts.DataBind() Else End If e.Message = GetStatusMessage(endOffset, ComboAllContacts.Items.Count)
var selectedNode = treeView.get_selectedNode();
alert(selectedNode.get_text());
selectedNode.expand();