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

Refresh TreeView inside Splitter

5 Answers 143 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
AL
Top achievements
Rank 1
AL asked on 14 Jun 2009, 04:15 PM
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>

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Jun 2009, 01:06 PM
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.
0
AL
Top achievements
Rank 1
answered on 15 Jun 2009, 01:28 PM
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
                    |
                    |
0
Atanas Korchev
Telerik team
answered on 15 Jun 2009, 01:36 PM
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.
0
AL
Top achievements
Rank 1
answered on 15 Jun 2009, 01:54 PM
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?



0
Svetlina Anati
Telerik team
answered on 15 Jun 2009, 02:21 PM
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.
Tags
TreeView
Asked by
AL
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
AL
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or