This is a migrated thread and some comments may be shown as answers.

Autopostback and special days CSS classes

4 Answers 114 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Zach
Top achievements
Rank 1
Zach asked on 04 Aug 2009, 10:20 PM
Hello, I searched your forum, and this post seems to reference my issue, but the solution given does not apply to me:
http://www.telerik.com/community/forums/aspnet-ajax/calendar/disable-hover-css-class.aspx

Some weird things are happening to my page when the autopostback property is set to true.  The reason I need to use this is because I want to give certain days a special class, which is determined by hitting a database on the DayRender event.  The main issue is that once the month is changed, if you hover over one of these special days, it loses its special class even after its not being hovered anymore.  The only way to get the class back is to change the month again.  Again this only happens after a postback, the first displayed month works fine pre-postback.

Another minor issue I'm having is that after performing a post back on the calendar, an IE only style sheet is loaded which messes up the display of the page.  The way I'm making this style sheet IE only is the following block:
    <!--[if lte IE 6]>
      <link media="screen, projection" type="text/css" href="css/ieStyles.css" rel="stylesheet"/>
    <![endif]-->

If this is not stated clear enough, I'll be more than happy to try to give a more repeatable example.

4 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 10 Aug 2009, 08:56 AM
Hello Zach,

I believe that the answers on my colleague give a solutions to the described problems. May I ask you to give them a try and let me know which of the suggested approaches do not cover your needs? It will be helpful if you can post a code snippet, which shows how you tried to implement the suggested solutions.

Kind regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Zach
Top achievements
Rank 1
answered on 11 Aug 2009, 04:37 PM
I figured out the Special Days issue, I was using code for the non AJAX version of the RadCalendar.  However, the loading of IEstyles is still an issue.  I've built the simplest test case I can think of, and it appears the issue is actually with the AjaxManager.  Without it on the page, the styles don't load (correct), but when it is added to get the AJAX loading message to appear, the styles do load (incorrect).  In this example, what you should see is the event calendar on a white background.  However, once you click to change the month, you will see everything to the right of the calendar get its background color changed to blue.  Here is my simple test page, there is nothing in the code behind.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test2.aspx.cs" Inherits="Test2" %> 
 
<!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"
    <!--[if lte IE 6]> 
        <style type="text/css"
        #test 
        { 
            background-color:Blue; 
        } 
    </style> 
    <![endif]--> 
    <title>Untitled Page</title> 
</head> 
<body> 
    <div id="test"
        <form runat="server"
        <asp:ScriptManager runat="server" ID="uxScriptManager"
        </asp:ScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="uxEventsCalendar"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="uxEventsCalendar" LoadingPanelID="uxLoadingPanel"
                        </telerik:AjaxUpdatedControl> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="uxLoadingPanel" runat="server" Skin="Default"
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadCalendar runat="server" ID="uxEventsCalendar" ShowRowHeaders="false" 
            AutoPostBack="true" EnableMultiSelect="false"
        </telerik:RadCalendar> 
        </form> 
    </div> 
</body> 
</html> 
 

0
Accepted
Georgi Krustev
Telerik team
answered on 13 Aug 2009, 11:03 AM
Hello Zach,

In order to avoid the described behavior I will suggest you review the following help article.

Regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Zach
Top achievements
Rank 1
answered on 13 Aug 2009, 03:14 PM
Thanks for the info, that did the trick!
Tags
Calendar
Asked by
Zach
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Zach
Top achievements
Rank 1
Share this question
or