This is a migrated thread and some comments may be shown as answers.
Radcalender inside Repeater - Events not working
13 Answers 66 Views
This is a migrated thread and some comments may be shown as answers.
sankardeep v
Top achievements
Rank 1
sankardeep v asked on 25 Jan 2011, 07:14 AM
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

13 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 27 Jan 2011, 02:31 PM
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.
0
sankardeep v
Top achievements
Rank 1
answered on 28 Jan 2011, 10:53 AM
Hi,
Will you please give the Radajaxmanager settings i yhat I have to make here.

Regards
Sankardeep
0
Maria Ilieva
Telerik team
answered on 28 Jan 2011, 04:31 PM
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.
0
Maria Ilieva
Telerik team
answered on 28 Jan 2011, 04:31 PM
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.
0
sankardeep v
Top achievements
Rank 1
answered on 31 Jan 2011, 09:51 AM
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 .
0
Maria Ilieva
Telerik team
answered on 02 Feb 2011, 01:58 PM
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.
0
Rob Caruk
Top achievements
Rank 1
answered on 15 Apr 2011, 08:53 PM
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.



0
Maria Ilieva
Telerik team
answered on 20 Apr 2011, 04:30 PM
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.

0
Rob Caruk
Top achievements
Rank 1
answered on 20 Apr 2011, 04:53 PM
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
0
Maria Ilieva
Telerik team
answered on 21 Apr 2011, 03:42 PM

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.

0
sankardeep v
Top achievements
Rank 1
answered on 25 Apr 2011, 10:43 AM
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
 


0
Maria Ilieva
Telerik team
answered on 27 Apr 2011, 02:39 PM
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.

0
Rob Caruk
Top achievements
Rank 1
answered on 27 Apr 2011, 05:08 PM
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
Asked by
sankardeep v
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
sankardeep v
Top achievements
Rank 1
Rob Caruk
Top achievements
Rank 1
Share this question
or