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

Treeview always update itself if it's the initiator

12 Answers 73 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jacky Chau
Top achievements
Rank 1
Jacky Chau asked on 26 Mar 2008, 05:05 PM
I have a treeview that on node click will postback and update a panel.  I created an AjaxSetting with the treeview as the initiator and the panel as the updated control.  Everything works good but using Fiddler, I see that the treeview is sending its content to the client too.  Isn't that a waste of bandwidth since the treeview is not being updated?  Shouldn't it only send the panel content?

12 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 28 Mar 2008, 09:46 AM
Hi Jacky,

Unfortunately I was unable to reproduce this behavior with the given details. Is your treeview control set as updated control or inside of an update panel? Can you please send us a small working project (attached to a formal support ticket) where this issue can be reproduced? Thus we will do our best to provide up-to-the-point answer/solution.

Kind regards,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jacky Chau
Top achievements
Rank 1
answered on 28 Mar 2008, 03:36 PM
I opened a support ticket (129198) with a sample project.  The project has two ajax setting:

Button --> RadTreeView
RadTreeView --> Panel

Clicking on a RadTreeNode will update both the Panel and itself.  That's wrong since I didn't create a RadTreeView --> RadTreeView ajax setting.
0
Sebastian
Telerik team
answered on 28 Mar 2008, 03:58 PM
Hello Jacky,

We will review the project and will get back to you with more info on the subject - thank you for submitting it.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark Griebling
Top achievements
Rank 1
answered on 30 Mar 2008, 08:36 PM
I've seen the same with a list box.  An additional side effect is the list box scrolls which is really annoying.

Please post the results of the support ticket here.  Thank you.
0
Konstantin Petkov
Telerik team
answered on 31 Mar 2008, 06:00 AM
Hi Mark,

Here is the answer of my colleague to the corresponding ticket:

"In order to accomplish the requested scenario I suggest to hook to RadTreeView's ClientNodeClick event and do an AjaxRequest through the RadAjaxManager." We have also sent the updated example.

I hope this helps you resolve the problem on your end as well.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark Griebling
Top achievements
Rank 1
answered on 01 Apr 2008, 12:27 AM
Konstantin,

While I believe that will work, it is not a very practical solution.  Especially since this behavior is different than with Classic RadAjax. 

Implementing it requires changing a large part of the application to get the same behavior as before.  Additionally, on one page I will have multiple instances of this which means dealing with this problem.(http://www.telerik.com/community/forums/thread/b311D-bcdtdd.aspx)

There is still too much special handling in the beta version of Prometheus RadAjax.

Regards,
Mark
0
Konstantin Petkov
Telerik team
answered on 02 Apr 2008, 06:58 AM
Hello Mark,

We will do our best to improve the RadAjax for the official version. As to the backwards compatibility, dealing with MS UpdatePanels leads to some limitations which we are working around one by one.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark Griebling
Top achievements
Rank 1
answered on 02 Apr 2008, 01:08 PM
Thanks.  I am looking forward to each update.

One more note regarding update of List boxes.  For small listboxes it is probably not a problem in normal scenarios.  In my cases, the list boxes were contained within RadPanels.  When the listbox updated itself the panel contracted and expanded during the update.  Which was quite visually disruptive.  This did not happen when other controls updated the Listbox.
0
Konstantin Petkov
Telerik team
answered on 02 Apr 2008, 02:57 PM
Hello Mark,

By RadPanels do you mean RadAjaxPanel, RadSplitter pane or RadPanelBar item? Is this IE or Firefox specific?

Also, do you get the same effect performing AJAX update if the list box is wrapped inside ASP:UpdatePanel?

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark Griebling
Top achievements
Rank 1
answered on 03 Apr 2008, 04:03 AM
Konstantin,

It is a RadPanelBar.  I have since changed the UI of the application to simplify this interface for the developer(me) and the eventual user.  

I have tried to recreate the problem in a simple sample but was not successful.  For that reason, I believe the RadPanelItem contraction and expansion was caused by the combination of the refresh of the listbox and the specific stylesheet elements.  In my sample the Listbox is still included in the response and the Listbox will change scroll position depending on the item selected.

In trying to recreate the problem I noticed something.  The listbox was only included in the response when another control on the page updated the listbox.  In the following sample the Listbox is included in the response when clicking the list box.  If I remove the AjaxSetting on the Button, the Listbox is not included in the Listbox Click response.

Regards,
Mark
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListBoxUserControl.ascx.cs" 
    Inherits="Prometheus2.ListBoxUserControl" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<div class="panellist">  
    <div class="list">  
        <asp:ListBox ID="ListBox1" runat="server" CssClass="adminItems" AutoPostBack="True" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged">  
        </asp:ListBox> 
    </div> 
    <div> 
        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label> 
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Reset List Box" /> 
    </div> 
</div> 
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="ListBox1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="Label2" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="Button1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="ListBox1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
 
0
Konstantin Petkov
Telerik team
answered on 03 Apr 2008, 11:29 AM
Hi Mark,

Indeed, this is how RadAjaxManager currently function. There are UpdatePanels inserted around all the updated controls so you just need the list box in this case added anywhere in the AJAX settings to be able to update it.

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark Griebling
Top achievements
Rank 1
answered on 03 Apr 2008, 08:29 PM
Thanks Konstantin,

I'll wait a bit before I implement the AjaxRequest workaround.
Tags
Ajax
Asked by
Jacky Chau
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jacky Chau
Top achievements
Rank 1
Sebastian
Telerik team
Mark Griebling
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or