Refresh TreeView inside Splitter

6 posts, 0 answers
  1. AL
    AL avatar
    40 posts
    Member since:
    May 2008

    Posted 14 Jun 2009 Link to this post

    I am on a deadline and sincerely need any help!

    HOW to Refresh the selected node of a treeview, inside a splitter, by calling it from the contentPane.

    I have a splitter. Within the Splitter, on left pane I have the TreeView. This Treeview has sections (section1, section2...). Each section has %complete calculation coming from the database. On the right pane is the contentPage, where user fills data and saves it to the database. Each time user fills and saves the data in the rightPane/contentPage. I want the selected node in the treeview to be refreshed.

    Any help is appreciated.

    Here is my code:--

    <telerik:RadSplitter BorderSize="0" style="overflow:hidden" id="RadSplitter1" Skin="Outlook" runat="server" Height="700px"  width="100%">        
            <telerik:RadPane id="RadPane1" runat="server" width="250" CssClass="PanelBarBackground">
                <div class="tree-module">
                <table cellpadding="0" cellspacing="0">
                <tr><td colspan="3">&nbsp;</td></tr>
                <tr>
                    <td width="5px">&nbsp</td>
                    <td>
                         <telerik:RadTreeView ID="RadTreeView1" OnClientNodeClicked="OnClientNodeClicked" runat="server" Skin="Blue"
                         EnableEmbeddedSkins="False" OnPreRender="RadTreeView1_PreRender" SingleExpandPath="true">
                        <DataBindings>  
                            <telerik:RadTreeNodeBinding Target="ctl00_MiddleContent_ContentPane" />  
                        </DataBindings>
                    </telerik:RadTreeView>
                    </td>
                    <td width="5px">&nbsp</td>
                </tr>
                 <tr><td colspan="3">&nbsp;</td></tr>
                </table>
                </div>
            </telerik:RadPane>
            <telerik:RadSplitBar  Visible="true" id="RadSplitbar1" runat="server" collapsemode="Forward"></telerik:RadSplitBar>
            <telerik:RadPane id="ContentPane" runat="server" ContentUrl="about:blank" Scrolling="None">
            </telerik:RadPane>
        </telerik:RadSplitter>
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 15 Jun 2009 Link to this post

    Hi AL,

    I am not sure what you mean by refreshing a node. You can probably postback and populate the treeview with the new data. Please provide more info about your scenario - how is the user saving the data, do you use ajax, how is the treeview populated?

    All the best,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. AL
    AL avatar
    40 posts
    Member since:
    May 2008

    Posted 15 Jun 2009 Link to this post

    You Said, "You can probably postback and populate the treeview with the new data". OK, can you give me the code to postback and refresh the selected node inside the treeview. I need to refresh the treeview (which is located inside the leftPane of a splitter, and I need to make the postback call from the contentPane which is inside the splitter. The treeview view is populated from the database, and yes I am using AJAX.

    RadSplitter
    -----------------------------------
    TreeView     | contentPage
                        |
                        |
  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 15 Jun 2009 Link to this post

    Hello AL,

    I couldn't understand whether the treeview and content page are in the same ASPX. Could you please clarify?

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. AL
    AL avatar
    40 posts
    Member since:
    May 2008

    Posted 15 Jun 2009 Link to this post

    Treeview and content page are in different aspx page. Let me clarify:

    I have a MasterPage, within this masterpage is a contentPage called survey.aspx. Now the splitter is located inside the Survey.aspx page. The Treeview is located inside the Survey.aspx page (in the leftPane). The tree view is populated from database, and it has 2 levels of hierarchy. For example:

    Treeview
      --Section1
       ---- subSection1
       ---- subSection2
      --Section2

    Now, when I click either subSection1 or subSection2, a new aspx page called, SurveyQuestions.aspx gets loaded on the rightPane. The user enters survey related answers inside the surveyQuestions.aspx page, and then clicks te save button inside the surveyQuestons.aspx page. When the data is saved in the database, we know the treeView then needs to be refreshed.

    How can I call the treeview to reload/refresh from another aspx page insde the splitter, with the selected node (subSection1 or subSection2)  to be still selected upon postback?



  6. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 15 Jun 2009 Link to this post

    Hello AL,

    You can find a detailed article about controling an external page loaded in a RadPane from teh main page by using AJAX below:

    http://www.telerik.com/support/kb/aspnet-ajax/splitter/use-ajax-request-to-update-part-of-an-external-page-loaded-in-a-radpane.aspx

    Kind regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top