<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" EnableAJAX="true" LoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="onRequestStart" > <telerik:RadGrid ID="gridUsers" DataSourceID="srcUsers" runat="server" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" PageSize="10" AutoGenerateColumns="false"> <GroupingSettings CaseSensitive="false" /> <HeaderStyle Font-Bold="true" /> <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" Visible="true" EnableSEOPaging="true"/> <MasterTableView CommandItemDisplay="Top" AllowNaturalSort="false" DataKeyNames="distinguishedName"> <CommandItemSettings RefreshImageUrl="~/images/refresh_button.gif" ShowExportToWordButton="false" ShowExportToExcelButton="false" ShowExportToCsvButton="true" ShowExportToPdfButton="false" ExportToWordText="" ExportToExcelText="" ExportToCsvtext="" ExportToPdfText="" ExportToWordImageUrl="~/images/export_to_doc.gif" ExportToExcelImageUrl="~/images/export_to_xls.gif" ExportToCsvImageUrl="~/images/export_to_csv.gif" ExportToPdfImageUrl="~/images/export_to_pdf.gif" /> <Columns> <telerik:GridHyperLinkColumn HeaderText="Edit" DataNavigateUrlFormatString="EditUser.aspx?user={0}" DataNavigateUrlFields="objectGUID" UniqueName="link" ShowFilterIcon="false"/> <telerik:GridBoundColumn HeaderText="First Name" UniqueName="givenName" DataField="givenName" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" /> <telerik:GridBoundColumn HeaderText="Last Name" ItemStyle-Width="100%" HeaderStyle-Width="100%" UniqueName="sn" DataField="sn" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" /> <telerik:GridBoundColumn HeaderText="Created" ItemStyle-Wrap="false" UniqueName="whencreated" DataField="whencreated" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" /> <telerik:GridBoundColumn HeaderText="distinguishedName" UniqueName="distinguishedName" DataField="distinguishedName" Visible="false" FilterListOptions="VaryByDataType" FilterImageUrl="~/images/filter_icon.gif" /> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadAjaxPanel>var editorList = new Object();var editorLengthArray = [20, 30];var counter = 0;AlreadyAlerted = false;function isAlphaNumericKey(keyCode) { if ((keyCode > 47 && keyCode < 58) || (keyCode > 64 && keyCode < 91)) { return true; } return false;}function LimitCharacters(editor) { var style = editor.get_contentArea().style; style.backgroundImage = "none"; style.backgroundColor = "white"; editorList[editor.get_id()] = editorLengthArray[counter]; counter++; editor.attachEventHandler("onkeydown", function(e) { var content = editor.get_text().trim(); //returns the editor's content as plain text var words = 0; if (content) { var punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g; var contentcontent = content.replace(punctRegX, ""); var trimRegX = /(^\s+)|(\s+$)/g; contentcontent = content.replace(trimRegX, ""); if (content) { splitRegX = /\s+/; var array = content.split(splitRegX); words = array.length; } } var counter = $get("counter"); counter.innerHTML = "Words: " + words + " Characters: " + content.length + " <b>(Maximum character length is 2500)</b>"; e = (e == null) ? window.event : e; if (isAlphaNumericKey(e.keyCode)) { var maxTextLength = 2500; textLength = editor.get_text().length; if (textLength >= maxTextLength) { alert('You have exceeded the maximun character count of 2500.'); //alert('1'); AlreadyAlerted = true; e.returnValue = false; } } });} function CalculateLength(editor, value) { var textLength = editor.get_text().length; var clipboardLength = value.length; textLength += clipboardLength; return textLength;}function ClientExecuteCommand(editor, args) { var commandName = args.get_commandName(); var value = args.get_value(); if (commandName == "PastePlainText" || commandName == "Paste") { var textLength = CalculateLength(editor, value); if (textLength >= 2500) { if (!AlreadyAlerted) { alert("You have exceeded the maximun character count of 2500."); } AlreadyAlerted = false; args.set_cancel(true); } }}<telerik:RadEditor ID="RadEditor1" runat="server" SkinID="" Width="100%" SpellCheckSettings-AllowAddCustom="false" ToolsFile="../TelerikRichEditControl/ToolsFile.xml" OnClientPasteHtml="ClientExecuteCommand" Skin="Office2007" Height="300" EditModes="Design" OnClientLoad="LimitCharacters"></telerik:RadEditor><span id="counter">SelectedValue
then I got the error but if I remove it then it's fine but then no item is selected.<telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="StateName" DataValueField="ID" HighlightTemplatedItems="true" Height="190px" Width="220px" DropDownWidth="420px" DataSourceID="sdsStates" SelectedValue='<%#Bind("ID") %>' EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true"> <HeaderTemplate> <ul> <li class="col1">State Name</li> <li class="col1">Country</li> </ul> </HeaderTemplate> <ItemTemplate> <ul> <li class="col1"><%# DataBinder.Eval(Container.DataItem, "StateName")%></li> <li class="col1"><%# DataBinder.Eval(Container.DataItem, "countryabrv")%></li> </ul> </ItemTemplate> </telerik:RadComboBox>Dim strID As String = e.Item.GetDataKeyValue("ID").ToString()Response.Write(strID) I am trying to add special days dynamically, I have set the template of the special day via aspx, and I am trying to assign it the dates with code on DayRender event. Thing is, it's not happening.
The aspx code goes:
<telerik:DayTemplate ID="DisableTemplate" runat="server">
<Content>
<div class="rcTemplate rcDayDisabled">
</div>
</Content>
</telerik:DayTemplate>
the css:
.RadCalendar_Special .rcRow .rcDayDisabled
{
background:0 0 no-repeat url(Disabled.gif);
}
the c#:
protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
{
if (e.Day.Date < DateTime.Now.Date)
{
RadCalendarDay RadDay = new RadCalendarDay();
RadDay.TemplateID = "DisableTemplate";
RadDay.Date = e.Day.Date;
e.Cell.CssClass = "rcDayDisabled";
RadCalendar1.SpecialDays.Add(RadDay);
}
}
also I noticed that without the property: Repeatable="DayInMonth" filled the special day will not appear... is there a solution to these problems:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <asp:Label ID="LabelAdmin" runat="server" Text="" /> <telerik:RadDockZone ID="RadDockZoneContentBlock1" runat="server" MinHeight="50px" MinWidth="100px" BorderStyle="None"> <telerik:RadDock ID="RadDockContentBlock1" runat="server" DockHandle="None" DefaultCommands="None" OnClientInitialize="SetHandleDock" DockMode="Docked"> <ContentTemplate> <div id="Handle_ctl00_ContentPlaceHolder1_RadDockContentBlock1" style="cursor: move;"> <uc1:ContentBlock ID="ContentBlock1" ContentID="1" runat="server" /> </div> </ContentTemplate> </telerik:RadDock> </telerik:RadDockZone></asp:Content>