Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

How to retain Tree even after Page Postback on Button Click

$
0
0

@phreq wrote:

I have a Tree defined on the Page and it initiates and loads the data on a ListBox SelectedIndexChanged. This is working fine.
However, I open a modal popup on double clicking on the node and in that popup, I am trying to load data in a gridview. I cant use static WebMethod for this task in the codebehind file as I need selected values of all the listboxes on the form and them load them in the gridview and WebMethod does not directly give access to the page controls.
So I added a hidden asp button on the page and then fire its click event in the javascript where I open that popup this way:

function nodeDoubleClick(e, obj) {
   var clicked = obj.part;
   if (clicked !== null) {
    var thisnode = clicked.data;
    document.getElementById('__SelNodeKey').value = thisnode.key;
    $('#btnAutoClck').trigger('click');
    $('#dialog-form').dialog('open');
 }
}

Now my issue is that whenever I call the click event of this button, it causes a page postback and the populated tree gets disappeared. Is there any way I could retain the tree as it is or is there any way I could call the asp.net codebehind function?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles