Hello,
I have just update the infragistics version from 14.1.20141.2283 to 14.1.20141.2328 and a problem appeared.
In my case, I have a WHDG with one child band, and there is an <a> tag in the first column which is use to add a new child row by calling a javascript function. It works well in the original version, but in the later one, I am not able to add child row to a record that has no child band.
Here I found some reference that might be relevent:
http://dl.infragistics.com/community/aspnet/releasenotes/2014/12/14-1-20141-2328_ASPNET_RELEASE_NOTES.pdf
From the release note it state the following bug is fixed (page 5, 2nd item) --
"When a child band of the WebHierarchicalDataGrid have not items by defualt, even enabling the adding behavior will not allow to add new rows to that child band and the band will not have expand indicator"
It seems to be just the opposite of my case, I am facing a problem that was said to be solved. So how can I solve this?
Thanks in advance.
Regards,
KC
Thank you for posting in the Infragistics community !
In your original version, do you have a row in WebHierarchicalDataGrid with no child grid ? Does this row has an expand indicator ? Do you use BatchUpdating ? How exactly do you handle adding the child row ?
How this changed after upgrade ?
It would be very helpful to answer these so that I will be able to reproduce the exact behavior and suggest accordingly to solve your issue.
Looking forward to hearing from you.
Hi Hristo,
Thank you for your quick response.
Yes I have some records in the WebHierarchicalDataGrid with no child grid and in both version there are no expand indicator.
I am using BatchUpdating and use javascript to add new child rows. Here are some of my code:
EditingCore behaviors setting are as follow:
parent grid:
<igtbl:EditingCore BatchUpdating="true" AutoCRUD="false"></igtbl:EditingCore>
child band:
<igtbl:EditingCore BatchUpdating="true" AutoCRUD="false" EnableChildlessRowsPopulation="true"></igtbl:EditingCore>
And here is the js function:
function addNewChildRow(gridName) { var grid = $find(gridName); var gridBehaviors = grid.get_gridView().get_behaviors(); var parentRow = gridBehaviors.get_selection().get_selectedRows().getItem(0); if (parentRow == null) { parentRow = grid.get_behaviors().get_activation().get_activeCellResolved().get_row(); }
var childGrid = parentRow.get_rowIslands()[0]; var row = new Array(childGrid.get_columns().get_length()); for (var i = 0; i < row.length; i++) { row[i] = null; } childGrid.get_rows().add(row); parentRow.set_expanded(true);}
The bold line above doesn't work in the updated version. var childGrid is null here, the row island do not exist.
So how can I get the row island? Or maybe the right question should be how to create one?