Radcalender inside Repeater - Events not working

14 posts, 0 answers
  1. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 25 Jan 2011 Link to this post

    Hi,
    I am using Rad Calender inside a  Repeater.

    <asp:Repeater ID="ResultRpt" runat="server">
     <ItemTemplate>
     <telerik:RadCalendar Style="width: 191px; height: 123px" ID="RadCalendar1" runat="server"
      EnableMonthYearFastNavigation="false" AutoPostBack="true" MultiViewColumns="1"
      MultiViewRows="1" EnableMultiSelect="true">
      </telerik:RadCalendar>
    <telerik:RadToolTipManager Width="270px" Height="135px" Style="font-size: 11px" RelativeTo="Element"
      ID="RadToolTipManager1" runat="server" OffsetX="7" Position="MiddleRight"   OnAjaxUpdate="RadToolTipmanager1_AjaxUpdate"  Skin="Telerik" AutoCloseDelay="90000"                            </telerik:RadToolTipManager>
      </ItemTemplate>
      </asp:Repeater>

    this is my  rad ajax manager

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="RadCalendar1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadCalendar1"    LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
               </telerik:AjaxSetting>
                  <telerik:AjaxSetting AjaxControlID="calMarker">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadCalendar1"    LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                       <telerik:AjaxUpdatedControl ControlID="calMarker" LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
               </telerik:AjaxSetting>
                </AjaxSettings>
           <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
       </telerik:RadAjaxManager>
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue" />

    The tool tip on the date is not working . And the loading panel is not working for the onclick on the rad calender(instead the page is postbacking) .

    The calmarker control is a panel bar which is also inside the repeater its loading panel is also not working .

    These was working when there was no repeater. After i put the repeater control the issue started.

    Regards
    Sankardeep

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 27 Jan 2011 Link to this post

    Hello,

    Could you please try to add the RadAjaxManager to update the repeater control into the RadAjaxManager settings?
    Let me know if this makes any difference.


    Kind regards,
    Maria Ilieva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 28 Jan 2011 Link to this post

    Hi,
    Will you please give the Radajaxmanager settings i yhat I have to make here.

    Regards
    Sankardeep
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 28 Jan 2011 Link to this post

    Hello,

    Test the follwoing settings:
    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="ResultRpt"    LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
     </telerik:AjaxSetting>


    Greetings,
    Maria Ilieva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 28 Jan 2011 Link to this post

    Hello,

    Test the follwoing settings:
    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="ResultRpt"    LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
     </telerik:AjaxSetting>


    Greetings,
    Maria Ilieva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 31 Jan 2011 Link to this post

    Hi,,
    Now my Ajaxmanager looks like this
     
    <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadCalendar2">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadCalendar2" LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
               </telerik:AjaxSetting>
                  <telerik:AjaxSetting AjaxControlID="calMarker">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadCalendar2" LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                       <telerik:AjaxUpdatedControl ControlID="calMarker" LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
               </telerik:AjaxSetting>
               <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                  <UpdatedControls>
                      <telerik:AjaxUpdatedControl ControlID="ResultRpt" LoadingPanelID="RadAjaxLoadingPanel1">
                      </telerik:AjaxUpdatedControl>
                  </UpdatedControls>
            </telerik:AjaxSetting>
            </AjaxSettings>


    Now all the events are working fine . But the RadAjaxLoadingPanel is only showing for the first row of the repeater .
    Any idea why is that ?
    For all rows the events are working the only thing is the RadAjaxLoadingPanel is only shown for first row .
  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 02 Feb 2011 Link to this post

    Hi

    Could you please try to set the LoadingPanel to be the default for the RadAjaxManager by using the code bellow and verify if this makes any difference:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
       <AjaxSettings>
               .
               .
               .
        </AjaxSettings>
    </telerik:RadAjaxManager>



    Greetings,
    Maria Ilieva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  8. Rob Caruk
    Rob Caruk avatar
    4 posts
    Member since:
    Aug 2009

    Posted 15 Apr 2011 Link to this post

    Hello,

    I share the same issue with Sankar,


    My code is the same.  Rather than sending the entire repeater across the wire (too slow), I'd simply like to send the calendar data back, or at most the panelBar data from whatever calendar was clicked inside the repeater.  That to me would seem like a standard ajax application functionality.

    Is this possible with this control and a repeater?  This solution here is not practical for a high performance application.  I will at times have 20 calendars per page, so I need this to be smooth.

    Any ideas on how to make this work. It's a very straight forward process.



  9. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 Apr 2011 Link to this post

    Hello Rob,

    The only possibility to avoid adding the whole repeater as updated control is to add dynamic Ajax settings for the inner controls into the PagePreRender event. If you need to add the settings in the markup you still need to add the repeater to update itself in the Ajax settings.


    Kind regards,
    Maria Ilieva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  10. Rob Caruk
    Rob Caruk avatar
    4 posts
    Member since:
    Aug 2009

    Posted 20 Apr 2011 Link to this post

    Hi thank you for your reply.

    Could you point me towards an example of this?

    Also, do you think this method would degrade page performance?  If not then I'd be happy to give it a shot.

    r
  11. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 21 Apr 2011 Link to this post

    Hi Rob,

    Please review the help topic below which elaborates on adding Ajax Settings programmatically. Note that in your case this should be done in Page PreRender event:
    http://www.telerik.com/help/aspnet-ajax/ajax-add-ajaxsettings-programmatically.html

    Regarding the page performance it will definitely increase the performance compares to the scenario where the whole repeater updates itself.


    Regards,

    Maria Ilieva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  12. sankardeep v
    sankardeep v avatar
    26 posts
    Member since:
    Jan 2010

    Posted 25 Apr 2011 Link to this post

    Hi,

    I will explain our(me and Rob) scenario.
    We have a repeater , and inside a repeater we have a Radcalender .

    on the calender click  instead of sending the entire repeater across the wire (too slow), I'd simply like to send the calendar data back.
    please see my ajax manager and repeater ,

    <telerik:RadAjaxManager ID="rm" EnableEmbeddedScripts="false" DefaultLoadingPanelID="lp" runat="server">
    <AjaxSettings>  
    <
    telerik:AjaxSetting AjaxControlID="rc2">  
     <
    UpdatedControls>    
                 <
    telerik:AjaxUpdatedControl ControlID="panel1" LoadingPanelID="lp" />
     </UpdatedControls>
     </telerik:AjaxSetting>
     </AjaxSettings>
     </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="lp" runat="server" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" EnableEmbeddedScripts="false" />
    <div id="panel1">
    <asp:Repeater ID="ResultRpt" runat="server" Visible="false">
    <telerik:RadCalendar EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false" EnableEmbeddedScripts="false"  Height="150" Width="200" ID="rc2" runat="server"  AutoPostBack="true" EnableMultiSelect="true">
    </telerik:RadCalendar>
    </asp:Repeater></div>

    As per your suggestion we went for the dynamic addition of the ajax settings
    So we tried to add ajax settings  programmatically  inside the itemdatabound event of repeater( since we are not able to add this in page_render or page_load.)
    Dim RadCalendar2 As RadCalendar
    RadCalendar2 = DirectCast(e.Item.FindControl("rc2"), RadCalendar)
    rm.AjaxSettings.AddAjaxSetting(RadCalendar2, RadCalendar2)

    We had the following error when we added the above code 
    The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

    please help !!!!!!!!!!!!


    Sankardeep V
     


  13. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 27 Apr 2011 Link to this post

    Hi Rob Caruk,

    Note that in such scenario when you need to ajaxify only some controls form the repeater independently you should for sure add dynamic RadAjax settings and this should be always done on Page PreRender event in order to have the application works properly. Any other tries are not supported and will definitely fail. You could still use the easier option to add the whole repeater to update itself in the AjaxManager settings.

    Greetings,
    Maria Ilieva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  14. Rob Caruk
    Rob Caruk avatar
    4 posts
    Member since:
    Aug 2009

    Posted 27 Apr 2011 Link to this post

    The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).


    This has been fixed.  The issue was that there were <%= %> tags inside the repeater control.  They had to be changed to <%# %> as per instructions in other threads in this forum.

    regards,

    r
Back to Top