or
// Character and Word Counter for Telerik RadEditor// Parameters:// ID of the RadEditor// Maximum number of words allowed// Returns false if maxWords is exceeded, true otherwisefunction LimitWordCount(editorId, maxWords) { var content = $find(editorId).get_text(); var words = 0; var chars = 0; LimitWordCount = true; if (content) { punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g; content = content.replace(punctRegX, ""); if (content) { splitRegX = /\s+/; var array = content.split(splitRegX); words = array.length; chars = content.length; } } if (words > maxWords) { alert("Cannot exceed maximum word count. Please shorten text.\nTo undo a paste, click the undo button at the top of the text area.") LimitWordCount = false; }}<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Save" CssClass="linkbutton" OnClientClick='LimitWordCount("RadEditor1", 30)' />

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btn"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="lbl" LoadingPanelID="load1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy> <asp:label ID="lbl" runat=server /> <asp:Button ID="btn" runat=server Text="press" onclick="btn_Click" /> <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel>
<telerik:RadGrid ID="rg_GrowthRates" runat="server" AllowSorting="True" CellSpacing="0" GridLines="None" AllowFilteringByColumn="True" Width="100%" AllowPaging="True" PageSize="15" EnableViewState="False" ViewStateMode="Disabled" Skin="Metro" AllowAutomaticUpdates="True" AutoGenerateEditColumn="True"> <MasterTableView DataKeyNames="ID_SurveyInstitutional" EditMode="InPlace" > <CommandItemSettings ShowAddNewRecordButton="False" /> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> <EditItemStyle BackColor="LightSteelBlue" BorderColor="Black" BorderStyle="Dashed" BorderWidth="1px" HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" /> <PagerStyle AlwaysVisible="True" PageSizes="15;30;45;60;All" /> <CommandItemStyle BackColor="#FFFFC0" /> </MasterTableView> <PagerStyle AlwaysVisible="True" PageButtonCount="15" PageSizes="15;30;45;60;All" /></telerik:RadGrid>Private ReadOnly Property GridSource As DataTable Get Dim obj As Object = Me.ViewState("_gds") If (Not obj Is Nothing) Then Return CType(obj, DataTable) Else querystring = "SELECT ID_SurveyInstitutional, " & getDatabaseColumns(Session("selectedQuestion")) & " " & _ "FROM SurveyInstitutional " & _ "WHERE ID_AvailableQuarters = " & Session("selectedQuarter") RERCDataCenterConnection.Open() Dim existingCommand As New SqlCommand(querystring, RERCDataCenterConnection) Dim da As New SqlDataAdapter(existingCommand) Try da.Fill(questionTable) Catch ex As Exception Finally RERCDataCenterConnection.Close() End Try Me.ViewState("_gds") = questionTable Return questionTable End If End GetEnd PropertyFunction getDatabaseColumns(ByVal whichQuestion As Integer) Dim columnList As New DataTable Dim columnString As String = "" querystring = "SELECT DatabaseColumn FROM Const_InstitutionalColumnMatrix WHERE ID_Const_EditableQuestions = " & whichQuestion RERCDataCenterConnection.Open() Using getColumns As New SqlCommand(querystring, RERCDataCenterConnection) Dim da As New SqlDataAdapter(getColumns) Try da.Fill(columnList) Catch ex As Exception Finally RERCDataCenterConnection.Close() End Try End Using For Each row As DataRow In columnList.Rows columnString = columnString & row("DatabaseColumn") & ", " Next columnString = Left(columnString, Len(columnString) - 2) Return columnStringEnd FunctionPrivate Sub rg_GrowthRates_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles rg_GrowthRates.NeedDataSource ' If they select "Select a Question from the dropdown then clear the grid If CInt(Session("selectedQuestion")) < 1 Then rg_GrowthRates.DataSource = New String() {} Exit Sub End If rg_GrowthRates.DataSource = Me.GridSourceEnd SubPrivate Sub rg_GrowthRates_UpdateCommand(sender As Object, e As GridCommandEventArgs) Handles rg_GrowthRates.UpdateCommand Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem) Dim currentID As String = item.GetDataKeyValue("ID_SurveyInstitutional").ToString() Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) Dim editMan As GridEditManager = editedItem.EditManager Dim column As GridColumn For Each column In e.Item.OwnerTableView.Columns If TypeOf column Is IGridEditableColumn Then Dim editableCol As IGridEditableColumn = CType(column, IGridEditableColumn) If (editableCol.IsEditable) Then Dim editor As IGridColumnEditor = editMan.GetColumnEditor(editableCol) Dim editorText As String = "" Dim editorValue As Object = Nothing If (TypeOf editor Is GridTextColumnEditor) Then editorText = CType(editor, GridTextColumnEditor).Text editorValue = CType(editor, GridTextColumnEditor).Text End If If (TypeOf editor Is GridBoolColumnEditor) Then editorText = CType(editor, GridBoolColumnEditor).Value.ToString() editorValue = CType(editor, GridBoolColumnEditor).Value End If If (TypeOf editor Is GridDropDownColumnEditor) Then editorText = CType(editor, GridDropDownColumnEditor).SelectedText + "; " + CType(editor, GridDropDownColumnEditor).SelectedValue editorValue = CType(editor, GridDropDownColumnEditor).SelectedValue End If Try Dim changedRows As DataRow() = Me.GridSource.Select("ID_SurveyInstitutional = " + editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("ID_SurveyInstitutional").ToString()) changedRows(0)(column.UniqueName) = editorValue Me.GridSource.AcceptChanges() Catch ex As Exception e.Canceled = True End Try processEdits(column.UniqueName, editorValue, currentID) End If End If Next rg_GrowthRates.MasterTableView.ClearEditItems()End SubProtected Sub processEdits(ByVal columnName As String, ByVal newVal As String, ByVal currentID As Integer) Dim valueToUpdate As Double If Not IsDBNull(newVal) And Trim(newVal) <> "" Then valueToUpdate = CDbl(newVal) querystring = "UPDATE SurveyInstitutional " & _ "SET " & columnName & " = " & valueToUpdate & " " & _ "WHERE ID_SurveyInstitutional = " & CInt(currentID) Else RERCDataCenterConnection.Close() Exit Sub End If RERCDataCenterConnection.Open() Dim processEditAction As New SqlCommand(querystring, RERCDataCenterConnection) processEditAction.ExecuteNonQuery() RERCDataCenterConnection.Close() rg_GrowthRates.EditIndexes.Clear() rg_GrowthRates.Rebind()End Sub
MonthVisibleAppointmentsPerDay="1"
If there are more than two appointment in that day it shows 'show more' link in date column.
How can i hide the 'show more' link from montview date column?
Thanks


Hi,
I have a Problem with the Telerik AsyncUpload Control. I'm using VS2010 Pro.
When I'm using this control in a single Webpage it works:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <script type="text/javascript"> //Put your JavaScript code here. </script> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <div> </div> <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MultipleFileSelection="Automatic" TargetFolder="C:\TEMP"> </telerik:RadAsyncUpload> <telerik:RadProgressArea ID="RadProgressArea1" runat="server"> </telerik:RadProgressArea> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Upload" /> </form></body></html><%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="WebAppTelerik2.Site1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title> TEST </title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder></head><body> <form id="form1" runat="server"> <asp:Label ID="lbltest" runat="server" Text="Test Label" /> <div> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form></body><%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebAppTelerik2.ChildPage" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"> </asp:ScriptReference> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"> </asp:ScriptReference> </Scripts></telerik:RadScriptManager><telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" ChunkSize="0"></telerik:RadAsyncUpload></asp:Content>