jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Tree › jqxtree itemclick source update jqxgrid
Tagged: angular tree, angular2 tree, bootstrap tree, javascript tree, jquery tree, jqwidgets tree, jqxtree, typescript tree
This topic contains 7 replies, has 2 voices, and was last updated by Hristo 8 years, 4 months ago.
-
Author
-
Hi I want to create a pair relationship between the jqxtree and the jqxgrid. For example in the tree there is Item name ‘Subheader’, once I click that item. I want to do source update on the jqxgrid and show the rows based on the item’s id from the tree that we clicked on.
Please show an example. I have created a jsfiddle link below
Here is my jsfiddle
http://jsfiddle.net/Q92wz/162/Hello dan123,
I would like to suggest you look at this topic:
http://www.jqwidgets.com/community/topic/jqxtree-itemclick-and-checkbox-event-push-to-jqxgrid/
There has a similar discussion.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comNo i need some kind of jsfiddle example. The demos u showed arent the ones i need
Hey I was able to get the itemclick and update source data to the grid.
Problems still facing:
1) But now whenever I click on a different item on the tree, it doesnt update the source of the grid.2) And also if suppose I had a row with id = 2 with two records(rows). It only updates the grid and show only one row with id = 2. But it suppose to give both rows.
Here is my fiddle
http://jsfiddle.net/Q92wz/213/Hello dan123,
I would like to recommend you simplify your example.
Also, it is possible to have trouble because of use one and same “id” (in your ‘dataDetail’).
And could you try to usevar itemId = event.args.element.id;
outside of the for loop instead of ‘item.id’ in for loop because every time will set one and same item.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThank you so much
Hey I need one more small help. Suppose I click on item ‘Purchased’, it has two records in the jqxgrid detail as detail related to master 1 and detail related to master 1.5. Ok suppose I clicked on detail related to master 1 row, it selects that row ok. But when I click on a different Item on the tree such as ‘Sold’, and look at the jqxgrid detail. It will show that selection on detail related to master 2 row. But I only did selection in Item ‘Purchased’ detail.
Here is my fiddle
http://jsfiddle.net/dgjemdtd/23/Hello dan123,
I am not sure I understand your question.
When you select “Sold” it shows “…master 2” details because they are compared by ‘id’ ("id": "2"
) and they matched.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.