jQWidgets Forums
Forum Replies Created
-
Author
-
I just wanted to give an update to this issue. I was able to work around the above issue. The solution
was basically creating an object on the window to store the required data(reference). This object is keyed by the data-key of the current row. The only data on this object is for the secondary dataGrids that are shown. This object is created in the secondary expand/collapse click event of the tree grid row (TreeGrid column, ui-icon-plus/ui-icon-minus). Using the rowExpand/rowCollapse events of the TreeGrid API, I was then able to use the above object to reapply the expand/collapse status of the secondary DataTable to all displayed DataTables.Events Used:
rowClick – Limited to column and left mouse button, Creates custom row if needed, builds DataTable, show/hide row, Create window object
rowExpand – loops through all elements on the custom window object and rebuilds custom row and DataTable if needed
rowCollapse – loops through all elements on the custom window object and rebuilds custom row and DataTable if needed
This is just a start so I am sure there are other places that this will be needed as well when the TreeGrid rebuilds the DOM. I can give more detail/code examples on this if needed.
That won’t either. That adds the new row to the hierarchy and is show when expanding the child leafs. This new row needs to only be a container for non-hierarchical data. Like I stated before, I do have this working partially manually modifying the DOM using jQuery. The main issue is the widget redrawing the whole table and wiping out my changes to the DOM including custom element attributes. Maybe a better depiction is as follows:
Item 1 | | | |---- Item 1 Tabular Data (Not hierarchical, sub table of level, Expands separately from hierarchy) | |---- Item 1 Sub 1 | |---- Item 1 Sub 2 | | | | | |---- Item 1 Sub 2 Tabular Data (Not hierarchical, sub table of level, Expands separately from hierarchy) | | | |----Item 1 Sub 2 Leaf 1 | | ---- Item 1 Sub 3 Item 2 | | ---- Item 2 Sub 1 Item 3
A little better explanation would be I need each hierarchy level to also have a related table of other data. Visually it would look similar to below:
Item 1 | |---- Item 1 Tabular Data (Not hierarchical, sub table of level, Expands separately from hierarchy) | | ---- Item 1 Sub 1 | |---- Item 1 Sub 2 | | | ---- Item 1 Sub 2 Tabular Data (Not hierarchical, sub table of level, Expands separately from hierarchy) | ---- Item 1 Sub 3 Item 2 | | ---- Item 2 Sub 1 Item 3
how does it add a child of another row? All I am seeing is it adding a row to the root according to the API (‘first’, ‘last’)…
This will not work as the addRow method adds a new hierarchy row… I need a row or rows that is/are NOT hierarchical.
-
AuthorPosts