It only works in my javascript function - Telerik.Web.UI.InputErrorReason.OutOfRange. But the actual calendar still let's me pick between 1980 and 2099.
Even though the mindate is set to 01/01/2008 and the maxdate is set to 03/29/2008. I'm passing 2 parameters/properties into the usercontrol.
public DateTime DateFrom
{
get { return this.RadDatePicker1.MinDate; }
set { this.RadDatePicker1.MinDate = value; }
}
public DateTime DateTo
{
get { return this.RadDatePicker1.MaxDate; }
set { this.RadDatePicker1.MaxDate = value; }
}

I want to do this dynamically in the codebehind. Is that possible?
<HeaderTemplate>
<div>
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 25%;">
User Id
</td>
<td style="width: 25%;">
Name
</td>
<td style="width: 50%;">
Depart
</td>
</tr>
</table>
</div>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 100%;" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 25%;">
<div >
<%
# DataBinder.Eval(Container.DataItem, "id")%>
</div>
</td>
<td style="width: 25%;">
<div >
<%
# DataBinder.Eval(Container.DataItem, "name") %>
</div>
</td>
<td style="width: 50%;">
<div >
<%
# DataBinder.Eval(Container.DataItem, "dep")%>
</div>
</td>
</tr>
</table>
</ItemTemplate>
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="testradwindowiframe.aspx.cs" Inherits="Test_testradwindowiframe" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <html> |
| <head> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <script language="javascript" type="text/javascript"> |
| var oWnd; |
| function Test(wizardID) |
| { |
| oWnd = $find( '<%= TestPopupWindow.ClientID %>' ); |
| oWnd.setUrl('http://www.yahoo.com'); |
| oWnd.show(); |
| } |
| function TestClientCallBack(radWindow, returnParameters) |
| { |
| } |
| </script> |
| <asp:ScriptManager ID="ScriptManager1" runat="server" /> |
| <telerik:RadWindowManager id="Singleton" runat="server" Skin="Vista"> |
| <windows> |
| <telerik:RadWindow ID="TestPopupWindow" runat="server" Height="300" Width="300" |
| DestroyOnclose="false" |
| Modal="true" |
| VisibleStatusbar="false" |
| VisibleTitlebar = "true" |
| NavigateUrl="" |
| Title = "Test" |
| Behaviors="Close,Move" |
| ClientCallBackFunction="TestClientCallBack" |
| /> |
| </windows> |
| </telerik:RadWindowManager> |
| <a href="javascript:void(0)" onclick="javascript:Test(0)">Test(0)</a> |
| <iframe id="ViewWizardSummaryIFrame" width="20" height="20"/> |
| <p>Test Page</p> |
| </form> |
| </body> |
| </html> |
if (!Page.IsPostBack){
originalEnabledColor = igcWebTxtEvent.EnabledStyle.BackColor; originalFocusedColor = igcWebTxtEvent.FocusedStyle.BackColor ;
originalHoverColor=igcWebTxtEvent.HoveredStyle.BackColor ;
}
protected void chkOmitEvent_CheckedChanged(object sender, EventArgs e)
{
if (chkOmitEvent.Checked)
{
igcWebTxtEvent.EnabledStyle.BackColor=
System.Drawing.Color.LemonChiffon;
igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;
}
else
{
igcWebTxtEvent.EnabledStyle.BackColor = originalEnabledColor;
igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;
}
}
Now the problem is that after the server event is called after postback, all colors become lemon, when hovered/focused. And this behavior propogates since the client side function only sets the enabled color and not the focused/hovered colors. So even when the checkbox is unchecked, the hovered/focused colors remain lemon.
However the "else" part of the if condition (when the skin behavior is restored)
else
{
igcWebTxtEvent.EnabledStyle.BackColor = originalEnabledColor;
igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;
}
works fine when it is restored after a postback. And the main observation is that if I do not add the following two lines:
igcWebTxtEvent.FocusedStyle.BackColor = originalFocusedColor;
igcWebTxtEvent.HoveredStyle.BackColor = originalHoverColor;
the hover/focused background colors remain lemon whereas the enabled style one is the same as the skin which is blue. Because my understanding was setting the enabled style background color sets all background colors as is the case when I am setting it to Lemon but not the case when I am setting it to its original color. Original backcolor also happens to be "None". Which is why I guess this is happening.
This is what I am looking for ideally:
1. When a checkbox is checked, the enabled backcolor becomes lemon however focused/hovered remain white
2. When the the checkbox is unchecked, the original skin behavior is restored.
This has to be handled on both client side and server side due to postbacks. On client side it is working fine. However, on the server side it is not.
Is there any other way of acheiving this? I tried to play around with the style attributes, css attributes on the server side but got nothing to work.
Any help would be greatly appreciated.
Thanks,
Tal