Hello, I am trying to dynamically add a set of rows with first row as parent, and other rows as child of that parent.
I am doing the following:
@(Html .Infragistics() .TreeGrid(Model.GetQuoteDataRows()) .ID("otc-option-quote-page-tree-grid") .Width("100%") .Height("100%") .AutoGenerateColumns(false) .AutofitLastColumn(true) .PrimaryKey("PrimaryKey") .ForeignKey("ParentId") .ForeignKeyRootValue("0"));
I then call a function with this logic:
var grid = $("#grid"); $.each(dataRows, function (index, value) { grid.igTreeGridUpdating("addRow", value); });
Each value has the primaryKey and foreignKey field set.
However, this seems to add the rows as a flat structure, and does not keep the tree structure.
Is there another method I need to be calling on igTreeGrid?
Thanks Tsanna,
For the first issue, I upgraded my cdn links to point to the latest release (2016.1):
http://cdn-na.infragistics.com/igniteui/2016.1/latest/js/infragistics.core.js http://cdn-na.infragistics.com/igniteui/2016.1/latest/js/infragistics.dv.js http://cdn-na.infragistics.com/igniteui/2016.1/latest/js/infragistics.lob.js
Do you have a "latest" link that I can use?
For the second issue, I have gone around it by using the underlying dataSource directly to add/update/delete rows.
Thanks,
Jose
Hello Jose,
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 220126.I've opened a private case for you with number: CAS-173869-Q5N2G2 and have linked the development issue to it so that you'll be notified once the issue has been resolved.You can find the case by going to your account on our web site and then to the "Support activity" tab.You can view the status of the development issue connected to that case by selecting the "Development Issues" tab when viewing this case. Please let me know if you need more information.
Regards,Tsanna
Please note that child row adding functionality of igTreeGrid is available since v16.1 of our product. Therefore make sure that you're using v16.1. If this is not the case, then please send me a sample that reproduces the error. About your previous question related to child row deleting, I'm in process of logging a development issue for that, since I tested it on my side and determine that the child rows still persist in the datasource after deleting their parent.
Regards, Tsanna
Hi Tsanna, I am also seeing this in my browser log:
jquery-2.2.2.js:253 Uncaught Error: no such method 'addChild' for igTreeGridUpdating widget instance
Can you please advise?
Thanks Tsanna!
Another question, if I delete a tree node in the igTreeGrid, I see that the child nodes disappear from the view, but the deleted tree node is marked as deleted (strikethrough, italic, gray). Can I assume that the child nodes have also been deleted? Or do they still persist in the dataSource?
Thanks!