or
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function onClose() { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("closed"); |
| } |
| function onOpen() { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("opened"); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" |
| onajaxrequest="RadAjaxManager1_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="Label1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadWindow ID="RadWindow1" runat="server" |
| OpenerElementID="<%# Button1.ClientID %>" |
| OnClientClose="onClose" OnClientShow="onOpen" |
| > |
| </telerik:RadWindow> |
| <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> |
| <asp:Button ID="Button1" runat="server" Text="Button" /> |
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| public partial class WebUserControl : System.Web.UI.UserControl |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| } |
| protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) |
| { |
| switch (e.Argument) |
| { |
| case "closed": |
| Label1.Text = "Closed"; |
| break; |
| case "opened": |
| Label1.Text = "Opened"; |
| break; |
| } |
| } |
| } |
| Content Page (aspx): |
| <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> |
| </asp:Content> |
| <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> |
| <asp:PlaceHolder ID="holder" runat="server"></asp:PlaceHolder> |
| </asp:Content> |
| Content Page (.cs): |
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| public partial class _Default : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| Control ucControl = LoadControl("~/WebUserControl.ascx"); |
| ucControl.ID = "MyUserControl"; |
| holder.Controls.Add(ucControl); |
| } |
| } |
| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="adminnomaster.aspx.vb" Inherits="Test_adminnomaster" %> |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
| <!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>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <div> |
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" |
| AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" |
| DataSourceID="AccessDataSource" GridLines="None" Skin="Hay" |
| AllowAutomaticUpdates="True" |
| AllowAutomaticinserts="True" |
| AllowAutomaticDeletes="True" |
| AutoGenerateColumns="False"> |
| <MasterTableView datakeynames="EventID" EditMode="popup" |
| datasourceid="AccessDataSource" |
| AllowAutomaticUpdates="true" |
| AllowAutomaticinserts="true" |
| AllowAutomaticDeletes="true" |
| > |
| <EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit ProductID: {0}" |
| CaptionDataField="ProductID" PopUpSettings-Modal="true" > |
| <PopUpSettings width="700" /> |
| </EditFormSettings> |
| <EditFormSettings InsertCaption="Add new item" |
| CaptionFormatString="Edit Event: {0}" |
| CaptionDataField="EventID" PopUpSettings-Modal="True" > |
| <PopUpSettings Modal="True"></PopUpSettings> |
| </EditFormSettings> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="EventID" DataType="System.Int32" |
| HeaderText="EventID" ReadOnly="True" SortExpression="EventID" |
| UniqueName="EventID"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="EventName" HeaderText="EventName" |
| SortExpression="EventName" UniqueName="EventName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridHTMLEditorColumn DataField="EventDescription" |
| HeaderText="Description" UniqueName="EventDescription"> |
| </telerik:GridHTMLEditorColumn> |
| <telerik:GridDateTimeColumn DataField="EventDate" HeaderText="Date" |
| UniqueName="EventDate"> |
| </telerik:GridDateTimeColumn> |
| <telerik:GridDateTimeColumn DataField="EventStartTime" HeaderText="Start Time" |
| MinDate="1899-01-29" PickerType="TimePicker" UniqueName="EventStartTime"> |
| </telerik:GridDateTimeColumn> |
| <telerik:GridDateTimeColumn DataField="EventEndTime" HeaderText="End Time" |
| MinDate="1800-01-01" PickerType="TimePicker" UniqueName="EventEndTime"> |
| </telerik:GridDateTimeColumn> |
| <telerik:GridHTMLEditorColumn DataField="EventLocation" HeaderText="Location" |
| UniqueName="EventLocation"> |
| </telerik:GridHTMLEditorColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <asp:AccessDataSource ID="AccessDataSource" runat="server" |
| DataFile="~/App_Data/Events.mdb" |
| DeleteCommand="DELETE FROM [tbEvents] WHERE [EventID] = ?" |
| InsertCommand="INSERT INTO [tbEvents] ([EventID], [EventName], [EventDescription], [EventDate], [EventStartTime], [EventEndTime], [EventLocation]) VALUES (?, ?, ?, ?, ?, ?, ?)" |
| SelectCommand="SELECT * FROM [tbEvents] ORDER BY [EventDate] DESC" |
| UpdateCommand="UPDATE [tbEvents] SET [EventName] = ?, [EventDescription] = ?, [EventDate] = ?, [EventStartTime] = ?, [EventEndTime] = ?, [EventLocation] = ? WHERE [EventID] = ?"> |
| <DeleteParameters> |
| <asp:Parameter Name="EventID" Type="Int32" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="EventName" Type="String" /> |
| <asp:Parameter Name="EventDescription" Type="String" /> |
| <asp:Parameter Name="EventDate" Type="DateTime" /> |
| <asp:Parameter Name="EventStartTime" Type="DateTime" /> |
| <asp:Parameter Name="EventEndTime" Type="DateTime" /> |
| <asp:Parameter Name="EventLocation" Type="String" /> |
| <asp:Parameter Name="EventID" Type="Int32" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="EventID" Type="Int32" /> |
| <asp:Parameter Name="EventName" Type="String" /> |
| <asp:Parameter Name="EventDescription" Type="String" /> |
| <asp:Parameter Name="EventDate" Type="DateTime" /> |
| <asp:Parameter Name="EventStartTime" Type="DateTime" /> |
| <asp:Parameter Name="EventEndTime" Type="DateTime" /> |
| <asp:Parameter Name="EventLocation" Type="String" /> |
| </InsertParameters> |
| </asp:AccessDataSource> |
| </div> |
| <telerik:RadAjaxManager runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| </form> |
| </body> |
| </html> |
| Protected Sub rsTasksNew_AppointmentCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCommandEventArgs) Handles rsTasksNew.AppointmentCommand |
| Try |
| 'check if insert command |
| If e.CommandName = "Insert" Or e.CommandName = "Update" Then |
| Dim ddlBuyer As RadComboBox = CType(e.Container.FindControl("ResAssigned-To"), RadComboBox) |
| 'check for existing buyer with same name and set them as the selected index |
| ddlBuyer.SelectedIndex = ddlBuyer.FindItemIndexByText(ddlBuyer.Text.Trim(), True) |
| 'hold buyer id |
| Dim BuyerId As Integer = IIf(ddlBuyer.SelectedIndex > -1, ddlBuyer.SelectedValue, 0) |
| 'if new buyer being entered |
| If BuyerId = 0 Then |
| 'save new buyer |
| BuyerId = SaveBuyer(ddlBuyer.Text.Trim(), Session(SessionVariables.Cur_Client_ID)) |
| 'add buyer to list and set as selected |
| ddlBuyer.Items.Add(New RadComboBoxItem(ddlBuyer.Text, BuyerId)) |
| ddlBuyer.SelectedValue = BuyerId |
| End If |
| End If |
| Catch ex As Exception |
| End Try |
| End Sub |
| Server Error in '/GoRentPro' Application. |
| Invalid length for a Base-64 char array. |
| Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. |
| Exception Details: System.FormatException: Invalid length for a Base-64 char array. |
| Source Error: |
| An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
| Stack Trace: |
| [FormatException: Invalid length for a Base-64 char array.] |
| System.Convert.FromBase64String(String s) +0 |
| System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72 |
| System.Web.UI.LosFormatter.Deserialize(String input) +11 |
| Telerik.Web.UI.AdvancedTemplate.ExtractResourceValues(IDictionary target) +598 |
| Telerik.Web.UI.AdvancedTemplate.ExtractValues(Control container) +362 |
| Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +34 |
| Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +326 |
| System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 |
| System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 |
| System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 |
| System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 |
| System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 |
| System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 |
| System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 |
| Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016 |
Hi,
I am using RadScheduler in my project to display events. I have to display two events per day in month view and I have set VisibleAppointmentsPerDay property to 2 for the same. Now if any day in month has more than two events then it should show it in format +<No. of additional events> more.
e.g. +2more.
RadScheduler has property called ShowMore, but all the days in month shared this property i.e, if I set this property then the text is same accross all the days in month. Is there any way to customize this property, so that it should show different text for different days in month?
Thanks...