jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Tree › I am trying to to set or change label of an added tree item on run time
Tagged: angular tree, editing, javascript tree widget, jquery tree, jqxtree
This topic contains 4 replies, has 2 voices, and was last updated by sgaikwad 9 years, 6 months ago.
-
Author
-
December 4, 2015 at 12:05 pm I am trying to to set or change label of an added tree item on run time #78901
Hello,
I am trying to set or you can say changing label of an added tree item on run time by passing html as shown in the following code :function addnode()
{
var selectedItem = $(‘#jqxTree’).jqxTree(‘selectedItem’);selected_node = $(‘#’ + selectedItem.id);// This is a collection
if (selectedItem != null)
{
// adds an item with label: ‘item’ as a child of the selected item. The last parameter determines whether to refresh the Tree or not.
// If you want to use the ‘addTo’ method in a loop, set the last parameter to false and call the ‘render’ method after the loop.var shtml=”<span><table bgcolor=’#abc5d5′ width=’2px’ border=’0′><tr><td id=’addnodeid’><input type=’text’ style=’color: #000000;’ id=’adddnodeid” / ></td></tr></table></span>”;
$(‘#jqxTree’).jqxTree(‘addTo’, {id: “aaaaa” , html: shtml}, selected_node);
//$(‘#jqxTree’).jqxTree(‘addTo’, { lable: shtml},selected_node);
// update the tree.
$(‘#jqxTree’).jqxTree(‘render’);
}
else
{
$(‘#jqxTree’).jqxTree(‘addTo’, { label: ‘Item’ }, null, false);
// update the tree.
$(‘#jqxTree’).jqxTree(‘render’);
}
}issue : when i click on that added item to edit i.e when i type i can not see any thing on that input box.
can you please help me with this issue its urgent.December 7, 2015 at 4:07 am I am trying to to set or change label of an added tree item on run time #78953Any update on this please.
December 7, 2015 at 7:29 am I am trying to to set or change label of an added tree item on run time #78969I just got to know that its working in Chrome but its not working in IE 11
December 7, 2015 at 10:13 am I am trying to to set or change label of an added tree item on run time #78983Hi sgaikwad,
You cannot use input field in your tree items cause they are set to be unselected, so you can’t use the regular behavior of the input.
We recommend another approach with popup editing.
Please look at this popup editing demo. You can add your input field here.Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.comDecember 7, 2015 at 12:31 pm I am trying to to set or change label of an added tree item on run time #78997hey thanks for the response.
-
AuthorPosts
You must be logged in to reply to this topic.