using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Telerik.Web.UI; namespace ServerControl1 { [ToolboxData("<{0}:ScapaLoad runat=server></{0}:ScapaLoad>")] public class ScapaLoad : CompositeControl { RadComboBox _combo; [ Category("Data"), Description("Data source ID for populating combo box"), PersistenceMode(PersistenceMode.Attribute) ] public string DataSourceID { get { EnsureChildControls(); return _combo.DataSourceID; } set { EnsureChildControls(); _combo.DataSourceID = value; } } [ Category("Data"), Description("Database field with value to be used as a value of each combo box element"), PersistenceMode(PersistenceMode.Attribute) ] public string DataValueField { get { EnsureChildControls(); return _combo.DataValueField; } set { EnsureChildControls(); _combo.DataValueField = value; } } [ Category("Data"), Description("Database field to be used as a visible text for chosen element from combo box"), PersistenceMode(PersistenceMode.Attribute) ] public string DataTextField { get { EnsureChildControls(); return _combo.DataTextField; } set { EnsureChildControls(); _combo.DataTextField = value; } } protected override void CreateChildControls() { Controls.Clear(); _combo = new RadComboBox(); Controls.Add(_combo); } protected override void RecreateChildControls() { EnsureChildControls(); } protected override void Render(HtmlTextWriter writer) { AddAttributesToRender(writer); _combo.RenderControl(writer); } } }<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="ServerControl1" Namespace="ServerControl1" TagPrefix="aspSample" %> <%@ 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></title> </head> <body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"/> <asp:LinqDataSource ID="LinqDataSource1" runat="server" EnableDelete="true" ContextTypeName="TestLinqDataContext" EntityTypeName="" TableName="Users"> </asp:LinqDataSource> <aspSample:ScapaLoad ID="ScapaLoad1" runat="server" DataSourceID="LinqDataSource1" DataValueField="Name" DataTextField="Name" /> </div> </form> </body> </html> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%" LoadingPanelID="RadAjaxLoadingPanel1" onajaxsettingcreated="RadAjaxPanel1_AjaxSettingCreated" > <asp:Button Text="FirstButton" ID="FirstButton" runat="server" onclick="FirstButton_Click" /> <asp:TextBox runat="server" ID="FirstTxt" /> <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="200px" Width="300px" LoadingPanelID="RadAjaxLoadingPanel1" onajaxsettingcreated="RadAjaxPanel2_AjaxSettingCreated" > <asp:Button Text="SecondButton" ID="SecondButton" runat="server" onclick="SecondButton_Click" style="margin-bottom: 0px" /> <asp:TextBox runat="server" ID="SecondTxt"/> <asp:Label ID="SecondLable" runat="server" /> </telerik:RadAjaxPanel> </telerik:RadAjaxPanel> protected void RadAjaxPanel1_AjaxSettingCreated(object sender, Telerik.Web.UI.AjaxSettingCreatedEventArgs e) { e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always; } protected void RadAjaxPanel2_AjaxSettingCreated(object sender, Telerik.Web.UI.AjaxSettingCreatedEventArgs e) { e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always; } protected void FirstButton_Click(object sender, EventArgs e) { SecondTxt.Text = "ok"; } protected void SecondButton_Click(object sender, EventArgs e) { FirstTxt.Text = "ok"; SecondTxt.Text = "ok"; txt3.Text = "ok"; SecondLable.Text = "ok";
}
Hello All,
I have a very simple Calendar with 2 months, Sep and Oct
The SpecialDay is Oct first an must be only visible on the second month in the calendar.
So far so good.
In the first month of the calendar this date is not visible as a SpecialDay but when I hover over the date then the date lights-up while it must be disabled and when hover-off then the style is applied from the special date.
The screen dump’s show before hover and after hover.
I set the date on DayRender and compare the date to e.Day and the Month.
The tooltip is only visible on the second calendar month so I know the a have the correct day and month.
How can I disable the days form the other months without setting the property ShowOtherMonthsDays="false" ?
<head runat="server"> <title></title> <style type="text/css"> .RadCalendar .event_future { border: 1px solid Green !important; background-color: Lime; } .RadCalendar .rcOtherMonth a, .RadCalendar .riDisabled a { cursor: default; } </style> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadCalendar ID="RadCalendar1" runat="server" CultureInfo="nl-NL" EnableMultiSelect="False" EnableMonthYearFastNavigation="False" FirstDayOfWeek="Monday" MultiViewRows="2" TitleFormat="MMM" ShowDayCellToolTips="false" Skin="WebBlue" TitleAlign="Center" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False"> </telerik:RadCalendar> </form> </body> </html>
Protected Sub RadCalendar1_DayRender(sender As Object, e As Telerik.Web.UI.Calendar.DayRenderEventArgs) Handles RadCalendar1.DayRender Dim SpecialDay As Date = DateValue("1-10-2011") If e.Day.Date = SpecialDay AndAlso e.View.MonthStartDate.Month = SpecialDay.Month Then e.Day.IsSelectable = True e.Day.IsDisabled = False e.Cell.ToolTip = "SpecialDay" e.Cell.CssClass = "event_future" Else e.Day.IsSelectable = False e.Day.IsDisabled = True e.Cell.CssClass = "riDisabled" End If Me.RadCalendar1.SpecialDays.Add(e.Day) End Sub
Best regards,
Marco
.RadGrid_Sunset .rgGroupHeader td p{ color:#FF6633 !important;}var master = $find(gridID).get_masterTableView(); master.fireCommand("InitInsert", "");Grid correctly creates a new row but I never get to ItemCommand handler in codebehind. Why?
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode) { RadDatePicker StartDate = (RadDatePicker)e.Item.FindControl("DateofCommencement"); RadNumericTextBox Duration = (RadNumericTextBox)e.Item.FindControl("Duration"); RadDatePicker EndDate = (RadDatePicker)e.Item.FindControl("DateofCompletion"); Duration.Attributes.Add("onblur", string.Format("changeEndDate('{0}','{1}','{2}','{3}','{4}');", StartDate.ClientID, Duration.ClientID, EndDate.ClientID, Dtcomm, Dtcomplete)); } }