Version 4.6.1385.0
HeightSpec=BusinessHoues
Two samples
1) I have multiple tabs, calendar in one tab, grids in the others. ScrollPositionHour never activate, not in startup, not when passing between tabs
2) i have multiple tabs, calendar in more than one tab, ScrollPositionHour does not activate on startup but when passing from one tab to the other activates after a few seconds delay
I was using DayPilotLite version 2.3.206.0 and had no problem at all, i just passed to pro, distributed the update and... Doh!
Thanks in advance for your help,
Fabrizio
Fabrizio Cioni
-
4/17/2008 10:04:13 AM
Oh, just to detail i've also tried the workaround i found on bug forums
dpc.$('scroll').scrollTop = valueInPixels;
setting dpc to calObject.ClientId but just got javascript error
Fabrizio Cioni
-
4/17/2008 10:07:18 AM
The problem is caused by DayPilotCalendar being placed inside a hidden div (style="display:none"). It's not possible to set .style.scrollTop for elements that are inside such a hidden div.
Solution:
1. DayPilotCalendar is in the first tab
Just set ActiveTabIndex property of <ajaxToolkit:TabContainer> tag to "-1".
2. DayPilotCalendar is in another tab or there are more instances of DayPilotCalendar (in more than one tab)
You need to call the scrollbar position update function from the OnClientActiveTabChanged event:
<script type="text/javascript">
function updateScrollPos() {
dpc1.enableScrolling();
// dpc1 is the value of ClientObjectName property of DayPilotCalendar
// remember to call it for all DayPilotCalendar instances
}
</script>
<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="-1" OnClientActiveTabChanged="updateScrollPos" >
...
Thanks a lot, both your tips worked wonderfully.
Meanwhile sadly i found a minor bug (or at least it seems so to me).
If the value of the DataTextField contains the ' character (like in O'Connell) the event box gets all blacked out.
This is a minor problem still... in italian language is a commonly used character.
Thanks in advance for any help you can bring, you already saved my day.
Cheers,
Fabrizio
Fabrizio Cioni
-
4/18/2008 8:10:38 PM
What you need to do is to invoke dpc1.enableScrolling(); after the modal Panel is made visible.
- I'm not sure whether it's possible to hook the show event of the ModalPopupExtender on the client side (that would be the right place to put it).
- You could also try to invoke it manually and add the enableScrolling() call right after the show() call:
$find('mdlPopupExtender').show();
dpc1.enableScrolling();
Thanks for the response. I have found some places to do add the enableScrolling call which works, but not fully satisfied yet. Will try more places though.
Stupid ModalPopupExtender not having client side onshown event... ;)
Geir-Tore Lindsve
-
6/26/2008 2:34:52 PM
Found a neat way to handle this when the calendar is inside a ModalPopupExtender:
<script type="text/javascript">
function pageLoad()
{
var mpe = $find("mpe");
mpe.add_shown(onShown);
}
function onShown()
{
dpc1.enableScrolling();
}
</script>
<ajaxtoolkit:modalpopupextender ........ behaviorId="mpe" ..... /
Geir-Tore Lindsve
-
6/27/2008 8:23:15 AM