We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfListView or SfDataGrid?

We have a UI pattern where we display lists of things, and those things might need to be deleted (Xamarin Forms UWP app).  We would like the ability to add a radiobutton where the user would select a row by clicking the radiobutton in the row, and then hit a delete button to delete that row.

Using Syncfusion controls, what is a recommended way to go here?  The control must allow the ability to click/select the row as well as just selecting the radio button (without invoking the selection on the row).  Would 
SfListView or SfDataGrid work here (or something else?)?  Anything we need to keep in mind to achieve the functionality we are looking for here?

5 Replies

FP Farjana Parveen Ayubb Syncfusion Team July 4, 2019 09:48 AM UTC

Hi John, 
  
Thank you for contacting Syncfusion support. 
  
We have checked your query. Based on your requirement if you have single list of items you can achieve your requirement using SfListView. 
  
And instead if you have multiple columns you can achieve your requirement using SfDataGrid control. We have prepared sample in both SfListView and in SfDataGrid. You can prefer based on your requirement. 
  
  
  
Regards, 
Farjana Parveen A 



JL John Livermore July 5, 2019 09:07 AM UTC

Thanks for the examples.  I see you used a toggle switch for the row selector.  Can you show me an example with a radiobutton instead please?


SP Subburaj Pandian Veluchamy Syncfusion Team July 5, 2019 01:56 PM UTC

Hi John, 
  
Thank you for the update. 
  
Xamarin Forms does not have default support for RadioButton control. So, as per your requirement, we have modified the samples with SfRadioButtoncontrol in the ItemTemplate and GridTemplateColumn. Please find the sample from the below link. 
  
  
  
Please refer the following documentation link for getting started with SfRadioButton control. 
  
 
Regards,
Subburaj Pandian V  



JL John Livermore July 5, 2019 03:14 PM UTC

Thanks.  I had actually created a version of this on my own, and your sample has the same issue as mine.  Namely, when you click the radio button, previous ones clicked keep their "checked" state.  How can the sample be modified so only one radio button is "checked" at a time?


SP Subburaj Pandian Veluchamy Syncfusion Team July 6, 2019 12:44 PM UTC

Hi John, 
  
Thank you for the update. 
  
As per your requirement, we have modified the sample in which only one radio button is checked at a time for the items. Please find the sample from the below link. 
  
  
  
Regards,
Subburaj Pandian V  


Loader.
Live Chat Icon For mobile
Up arrow icon