Allow selection of empty parents, to allow creation of children.

I have a nested list view with one level of "folders" which each can contain as many children as I want. However I want to be able to add new "folders" as well as new children once inside a folder, I have all that functionality and it works just find, but when selecting a folder with no children, the list view does not enter into the item, it just stays on the level above because there are no children to show, I have seen people get around this in xamarian with the query event, but I cannot find anything like that for js/mvc. (Mind you I am creating the list view with mvc, and then interacting with it using js).


1 Reply

SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team December 13, 2021 01:35 PM UTC

Hi David, 
 
Greetings from Syncfusion support. 
 
We have checked your requirement to add new nested list items dynamically when clicking on the first level list item which has no children. This can be achieved using the select event and addItem method of ListView. 
 
For your reference, we have prepared simple demo sample which depicts how to dynamically add child item to the list item which has no children during initialization. 
 
 
Also, check out the following links which will help you on achieving this requirement in your application 
 
 
 
Please, let us know if you need any further assistance. 
 
Regards, 
Shameer Ali Baig S. 


Loader.
Up arrow icon