Deleting dynamic pageviews using Javascript

Posted by user203127 on Stack Overflow See other posts from Stack Overflow or by user203127
Published on 2010-05-27T03:08:00Z Indexed on 2010/05/27 3:11 UTC
Read the original article Hit count: 271

Filed under:

Hi,

I created dynamic tab creation application using telerik radstrip. I can delete the tabs that are creating dynamically using crossbar option. When i am deleting the tabs its just deleting the tabs but not pageview corresponding to the tab. I have tried to delete the pageviews but i am getting error like "Microsoft JScript runtime error: Object doesn't support this property or method" and pointing to

multiPage.get_pageViews().remove(pageView); code. Can anyone help me how to delete pageviews.

Thanks in advance.

Javascript code.

<script type="text/javascript">
    /* <![CDATA[ */
    function deleteTab(tabText) {
        var tabStrip = $find("<%= RadTabStrip1.ClientID %>");

        var multiPage = $find("<%= RadMultiPage1.ClientID %>");

        var tab = tabStrip.findTabByText(tabText);

        var pageView = tab.get_pageView();

        var tabToSelect = tab.get_nextTab();
        if (!tabToSelect)
            tabToSelect = tab.get_previousTab();

        tabStrip.get_tabs().remove(tab);
        multiPage.get_pageView().remove(pageView);

        multiPage.get_pageViews().remove(pageView);

        if (tabToSelect)
            tabToSelect.set_selected(true);
    }
    /* ]]> */
</script>

© Stack Overflow or respective owner

Related posts about JavaScript