I have a slider control and a webdatatree on a page.
when the slider value changes it fires a javascript function that then updates the value of the active node.
it appears to work on the client side as I can put a break right after I call set_valueString for the active node and it returns the the correct new value.
however, on post back, when I spin through the nodes, this node that was edited has a value of "" not the new value and not the original value it had when I first loaded the page.
javascript ---
var oActiveNode = oTree.get_activeNode(); oActiveNode.set_valueString(eventArgs.get_newValue());
is there a different method to set the node value via javascript?
Version=13.2.20132.2028
Hello,
I am glad that you've managed to resolve this issue, I believe that other community members will benefit from your solution.
About the context menu, I am using Firebug web development tool in order to have this intellisense. You can install it from here into your Firefox browser (https://getfirebug.com/).
After that open Console tab and start to type ig_controls and you will see all our controls that you have on your page.
In preparing a simple example, I found the issue.
Since the value I was trying to set the node value to is NOT a string, it ignores it!
So adding toString() to it works.
I had:
oActiveNode.set_valueString(eventArgs.get_newValue());
I now have:
oActiveNode.set_valueString(eventArgs.get_newValue().toString());
and it works.
Thanks!
out of curiosity, how are you getting that context menu to appear with the methods - is it in VS2013?
Thank you for contacting us.
Below you can find a screenshot that is showing the available methods when you get the active node.
About the issue, could you please send me isolated sample that is showing it in order to investigate this further for you.
Looking forward to hearing from you.
some more info:
i do set the text of the node later in that same javascript block and those changes persist upon postback to the server side:
oActiveNode.set_text(parseItemName(oActiveNode.get_text()) + ' [' + eventArgs.get_newValue() + ']');