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

Refresh/Rebind RadTreeList on RadWindow close

1 Answer 150 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Felice
Top achievements
Rank 1
Felice asked on 30 Dec 2014, 12:58 PM
I have a RadTreeList on a page and on the same page I open a Radwindow.
When the user has completed the task in the RadWindow, on button_click the DB is updated and the Radwindow is closed calling the funcion CloseWindow().

This is how I close the RadWindow from the inside the RadWindow:
<script type="text/javascript">
        function GetRadWindow() {
            var oWnd = null;
            if (window.radWindow) oWnd = window.radWindow;
            else if (window.frameElement.radWindow) oWnd = window.frameElement.radWindow;
            return oWnd;
        }
 
        function CloseWindow() {
            var oWnd = GetRadWindow();
            oWnd.close();
        }
    </script>

After the RadWindow is closed I need to rebind/refresh the RadTreeList which is on the parent page of the RadWindow.
How can I achieve that without using Ajax?

Thanks for supporting
Felice

1 Answer, 1 is accepted

Sort by
0
Accepted
Angel Petrov
Telerik team
answered on 05 Jan 2015, 09:10 AM
Hi Felice,

If you are able to obtain a reference to the RadTreeList client object yo can do something like this.

JavaScript:
function rebindTreeList() {
                var treeList = $telerik.findControl(document, "RadTreeList1");
                treeList.fireCommand("RebindTreeList");
            }

Bear in mind however that the above action will trigger a full postback. If refreshing the entire page is not desirable you can fire an AJAX request instead. Additionally keep in mind that rebinding the control solely on the client is not possible as it populates on the server.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TreeList
Asked by
Felice
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or