treeview and postback

Posted by Luis on Stack Overflow See other posts from Stack Overflow or by Luis
Published on 2010-03-18T08:23:15Z Indexed on 2010/03/18 8:31 UTC
Read the original article Hit count: 489

Filed under:
|
|

hi

I have a treeview, and already the javascript code to postback the page. Because when i select the father , auto-select the children.

this is my html code

<script>
    function foo()
    {
        var o = window.event.srcElement;
        if (o.tagName == "INPUT" && o.type == "checkbox")
        {
            __doPostBack("","");
        }
    }
</script>

        <asp:TreeView ID="HierarchicalTreeView" runat="server" OnSelectedNodeChanged="HierarchicalTreeView_SelectedNodeChanged"
            ShowLines="True" ExpandImageToolTip="Fechar &quot;{0}&quot;" CollapseImageToolTip="Fechar &quot;{0}&quot;"
            ExpandDepth="1" OnTreeNodeCheckChanged="HierarchicalTreeView_TreeNodeCheckChanged"
            EnableClientScripts="true" onClick="foo()">
            <NodeStyle CssClass="text" />
            <SelectedNodeStyle CssClass="text" Font-Bold="true" />
        </asp:TreeView>

How can i prevent from postback all page, and only the treeview???, so dont 'refresh' the page

© Stack Overflow or respective owner

Related posts about treeview

Related posts about c#