SfListView Item Click

Hi developer,
I could not do an item click in the listview..

each picture is 1 item in listview ..

code snippets : 
listview

please help :(

5 Replies

RS Rawoof Sharief Muthuja Sherif Syncfusion Team March 12, 2018 10:55 AM UTC

Hi Alperen Eker, 
 
We have checked the reported query “SfListView doesn’t select an item which contains picture as a whole in ItemTemplate” from our side. We would like to inform you that if the ItemTemplate of SfListView is loaded with images or set pre-defined BackgroundColor for its base parent element, the SelectionBackgroundColor will be hidden below the image View or ignored by the static BackgroundColor. However all the selection related events will be hooked properly and you can perform the selection operations using these events.  
 
If these events are not triggered at your end, please check whether the list of assembly references needed for SfListView has been added properly in your application. 
You can refer the below UG documentation link to know the list of assemblies for SfListView. 
  
  
If the above solution does not resolve the reported query, please share more details regarding your requirement for selecting the image item which helps to resolve the query better at our end. 
 
Regards, 
Rawoof M 



AE Alperen Eker March 12, 2018 06:13 PM UTC

thank you syncfusion but , 
what I want to do is to click on an item in the listview to get to a model in my model.I have no problem with color
https://paste.ubuntu.com/p/YNXxcT3vMX


RS Rawoof Sharief Muthuja Sherif Syncfusion Team March 13, 2018 12:14 PM UTC

Hi Alperen, 
 
We have checked the reported query “Need to get model data from its tapped event” from our side and we would like to let you know that you can get the item data from the ItemTappedEventArgs in the Tapped event of SfListView. 
 
Please refer the below code example.  
 
Code Example[C#]:  
 
public OrientationPage() 
{ 
    InitializeComponent(); 
    listView.ItemTapped += ListView_ItemTapped; 
} 
 
private void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e) 
{ 
  var pizzaInfo = e.ItemData as Model; 
} 
 
For your reference, we have attached the sample link below.  
 
 
Please let us know if you require further assistance.  
 
Regards,  
Rawoof M 



AE Alperen Eker March 13, 2018 01:04 PM UTC

https://youtu.be/6Y12_HDYJzw
still not working :(


RS Rawoof Sharief Muthuja Sherif Syncfusion Team March 14, 2018 01:02 PM UTC


Hi Alperen Eker, 

We have checked the reported query “SfListView doesn’t select an item when its item template is loaded with images” from our side. We have created a sample based on the attached template and found that the SfListView ItemTapped fires as expected from our side. We suspect that the reported behavior is due to reference assemblies not added in your renderer projects properly. So could you please check whether all the assemblies needed for SfListView has been referred properly in your project. 
 
For your reference, we have attached the tested sample and you can download it from the below link. 
 
 
Can you please check whether the reported issue occurs in our sample also? If yes, please share the details of the tested device. 
 
For further details please follow the incident created under your account. 
 
Regards, 
Rawoof M. 


Loader.
Up arrow icon