- Home
- Forum
- Xamarin.Forms
- SfListView or SfDataGrid?
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.
SIGN IN To post a reply.
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.
SfListView sample: https://www.syncfusion.com/downloads/support/forum/145689/ze/ListViewSample-924016563
SfDataGrid sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfGridSample721940741
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.
SfDataGrid Sample:https://www.syncfusion.com/downloads/support/forum/145689/ze/SfGridSample1098110789
Please refer the following documentation link for getting started with SfRadioButton control.
Getting Started with SfRadionButton :https://help.syncfusion.com/xamarin/sfradiobutton/getting-started
Regards,
Subburaj Pandian V
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.
SfListViewSample:https://www.syncfusion.com/downloads/support/forum/145689/ze/ListViewSample310817562
SfDataGridSample:https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfGridSample2051532180
Regards,
Subburaj Pandian V
Subburaj Pandian V
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
JL John Livermore
- Jul 3, 2019 07:16 PM UTC
- Jul 6, 2019 12:44 PM UTC