Treeview always update itself if it's the initiator

13 posts, 0 answers
  1. Jacky Chau
    Jacky Chau avatar
    108 posts
    Member since:
    Jun 2005

    Posted 26 Mar 2008 Link to this post

    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?
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 28 Mar 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jacky Chau
    Jacky Chau avatar
    108 posts
    Member since:
    Jun 2005

    Posted 28 Mar 2008 Link to this post

    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.
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 28 Mar 2008 Link to this post

    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
  6. Mark Griebling
    Mark  Griebling avatar
    129 posts
    Member since:
    Dec 2005

    Posted 30 Mar 2008 Link to this post

    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.
  7. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 31 Mar 2008 Link to this post

    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
  8. Mark Griebling
    Mark  Griebling avatar
    129 posts
    Member since:
    Dec 2005

    Posted 31 Mar 2008 Link to this post

    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
  9. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 02 Apr 2008 Link to this post

    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
  10. Mark Griebling
    Mark  Griebling avatar
    129 posts
    Member since:
    Dec 2005

    Posted 02 Apr 2008 Link to this post

    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.
  11. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 02 Apr 2008 Link to this post

    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
  12. Mark Griebling
    Mark  Griebling avatar
    129 posts
    Member since:
    Dec 2005

    Posted 02 Apr 2008 Link to this post

    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> 
     
  13. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 03 Apr 2008 Link to this post

    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
  14. Mark Griebling
    Mark  Griebling avatar
    129 posts
    Member since:
    Dec 2005

    Posted 03 Apr 2008 Link to this post

    Thanks Konstantin,

    I'll wait a bit before I implement the AjaxRequest workaround.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017