How to apply a different template for the selected item

Hey,

We want to apply a different template for the active/selected item in a ListView. How can we achieve this functionality?

Thanks,
Mano

3 Replies

MK Muthu Kumaran Gnanavinayagam Syncfusion Team May 30, 2018 04:07 AM UTC

Hi Mano, 

We would like to let you know that you can achieve your requirement using SelectedItemTemplate in SfListView. We have attached a sample for your reference and you can download it from the below location. 


Regards, 
G.Muthu kumaran. 



KS KrishnaKumar Shinde September 19, 2018 02:34 AM UTC

Hi,

We have a similar requirement where we want to apply a different template for the selected item.

Initially, the items in the list are Labels. When a single item is selected, we want to change the template from Label to an Entry. How can we achieve this?


JN Jayaleshwari N Syncfusion Team September 19, 2018 11:53 AM UTC

Hi KrishnaKumar,  
  
SfListView supports to change the selected item template. You can achieve it by using the SelectedItemTemplate of the SfListView. In the SelectedItemTemplate you can load any template when select an item.  
  
For your reference we have attached the sample and you can download it from the below link.  
  
  
Please let us know if you require further assistance.  
  
Regards,  
Rawoof M.  


Loader.
Up arrow icon