I have a WebHierarchicalDataGrid with two bands. I would like to enable row adding on the child band only. Right now the only way I can figure out how to get child band row adding enabled is to turn on parent band row adding; otherwise, if there are no rows in the child band the + icon on the parent band row doesn't display so I can't expand the parent row to get to the child grid to add a new child row.
Yes, that did exactly what I needed. Thank you very much Hristo!
Hello,I am still following your case. Did the suggested solution worked for your scenario ?If you have any concerns or questions, please feel free to contact me, I will be glad to help you.Thank you for choosing Infragistics components!
Hello batsipes,
I did a further research and it seems that enabling editing the parent somehow breaks the expansion where there is no child data. I suggest to keep the data set returning the text value and to hide the empty row that is used to add row to the parent. However the parent rows will still be editable, but you cannot escape that since you want to use dropdown providers.
In order to achieve this work around I set the row adding behavior of the parent as follows:
<ig:RowAdding Alignment="Top">
so that the empty row goes on top and then I access it and change its style like this:
function whdg1_RowAdding_Initialize(sender, eventArgs){ $(".igg_AddNewRow")[0].style.display = "none";
}
Please review the attached sample for a demonstration. I hope this works for your scenario. Please let me know IF I misunderstood you or if you have any additional questions on the issue.
Thanks Hristo. I just ran the sample and it does work, however, when I setup my grid the same way, I realized why I was having a problem. Two of my columns in the parent band are set to use dropdownproviders even though they are not editable so that the numeric backing field can be displayed as text. Is there a way to get around that and still have the expansion icons on the first row or do I need to just modify my data set to return the text value instead of the numeric value?
Hello bastsipes,
Thank you for posting in Infragistics forum !
I have prepared a small sample demonstrating how you could enable row adding behavior only for the child bands. Please review it and let me know if it suits your needs.