Hi Emil,
Thanks for contacting Syncfusion support.
We have achieved your requirement with ListView
template property. In ListView template, we have designed an image of person and their details which is showed using card Component in ListView.
For your kind information, by default
getSelectedItems method will return the data
while we mapping the dataSource text and id in fields property. So, In this application we have mapped dataSource text and id to fetch the details while selecting the list item through
select event. Refer to the below code snippet to bind select event in Listview.
|
function onSelect() {
// the dataSource must have 'text' field to work with getSelectedItems() method.
let selecteditem = document.getElementById('element').ej2_instances[0].getSelectedItems();
let valEle = document.getElementById('val');
valEle.innerHTML = '<b>Selected Item:</b>' + selecteditem.text;
} |
For your convenience we have prepared a sample and attached below. Refer to the below sample link.
Please let us know if you have any queries.
Regards,
M. Balaji