2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
SfListView allows you to disable selection for a particular set of items based on the provided conditions in SelectionChanging event of SfListView. Get the tapped item data from the IList AddedItem of ItemSelectionChangingEventArgs using which you can check whether it satisfies the condition and disable the selection through Cancel property as like below code example.
C# public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); } private void listView_SelectionChanging(object sender, Syncfusion.ListView.XForms.ItemSelectionChangingEventArgs e) { if (e.AddedItems.Count > 0 && (e.AddedItems[0] as Contacts).Category == "Non-Selectable items") e.Cancel = true; } }
Click here to download the sample. |
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.