Hi Lucas,
Thank you for contacting Syncfusion support.
Query #1: To start the listView showing the Movies content
We can achieve your requirement by using “selectItem” method. You can select the item only after the ListView was append in DOM and need to pass the parent Id to selectItem method as like in below code snippet,
Code Snippet
//Initialize ListView component
let nestedListObj: ListView = new ListView({
//Set defined data to dataSource property
dataSource: nestedListData,
//Map appropriate columns to fields property
fields: { iconCss: 'icon', tooltip: 'text' },
//Set true to show icons
showIcon: true,
//Set header title
headerTitle: 'Folders',
//Set true to show header title
showHeader: true
});
nestedListObj.appendTo('#listview');
nestedListObj.selectItem({ id: '04' }); //To Select parent
nestedListObj.selectItem({ id: '04-01' }); //To Select parent with chid item |
Query #2: Can I pass a path to select the item?
No, you can pass only the item’s text or id.
Query #3: Can the sub-items repeat the parents id?
No, Unique id is must be assigned for each item in the ListView.
Could you please check the above details and get back to us if you need any further assistance on this?
Regards,
Vinoth Kumar S