Hello all,
I have a WebMonthView and a WARP on an aspx. Basically, I want the user to be able to click a day in the WMV and have the WARP refresh to display relevant data for that day. I am unclear how to get the WMV to trigger the WARP on click so that I can load the data. Can anyone explain please? TIA.
Cheers,
Ryan
Hello Ryan,
Indeed, this seems a bit tricky, since the actual change event is available of the WebScheduleInfo control. However, I was able to make this work relatively easy, using the following approach (client-side events of the WebMonthView):
<script type="text/javascript"> function dayViewClicked(one, two, three, four, five) { var warp = ig_getWebControlById("<%= WebAsyncRefreshPanel1.ClientID %>"); warp.refresh(); } </script> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="20px" Width="80px"> <igsch:WebMonthView ID="WebMonthView1" runat="server" WebScheduleInfoID="WebScheduleInfo1"> <ClientEvents Click="dayViewClicked" /> </igsch:WebMonthView> <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" onactivedaychanged="WebScheduleInfo1_ActiveDayChanged"> </igsch:WebScheduleInfo> </igmisc:WebAsyncRefreshPanel>
The general idea is to call refresh for the warp panel on mouse click in the MonthView, then if the day changed, the WebScheduleInfo ActiveDayChanged event will fire on the server in the AJAX callback and you can change the date text there.
Please, let me know if this helps.
Thanks for the prompt reply. The javascript you posted helped me out with part of my problem. I wasn't sure how to reference the warp panel in javascript. Unfortunately, it is still not quite working right. When I click a day in the calendar, the warp refreshes, but the ActiveDayUtc property is still showing today's date instead of the date I clicked. The biggest difference between your code and what I am trying is that the WMV and WebScheduleInfo in my code are not in the WARP. The only thing in my WARP is a label which I am setting to the WSI.ActiveDayUtc.Value. I have a handler for the WSI ActiveDayChanged event, but it is not firing. Is it required for the WMV and WSI to be in the WARP for this to work? Thanks very much.
Rumen Stankov"]Hello Ryan, Indeed, this seems a bit tricky, since the actual change event is available of the WebScheduleInfo control. However, I was able to make this work relatively easy, using the following approach (client-side events of the WebMonthView): <script type="text/javascript"> function dayViewClicked(one, two, three, four, five) { var warp = ig_getWebControlById("<%= WebAsyncRefreshPanel1.ClientID %>"); warp.refresh(); } </script> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="20px" Width="80px"> <igsch:WebMonthView ID="WebMonthView1" runat="server" WebScheduleInfoID="WebScheduleInfo1"> <ClientEvents Click="dayViewClicked" /> </igsch:WebMonthView> <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" onactivedaychanged="WebScheduleInfo1_ActiveDayChanged"> </igsch:WebScheduleInfo> </igmisc:WebAsyncRefreshPanel> The general idea is to call refresh for the warp panel on mouse click in the MonthView, then if the day changed, the WebScheduleInfo ActiveDayChanged event will fire on the server in the AJAX callback and you can change the date text there.Please, let me know if this helps.