Xamarin.Forms.InputKit
Xamarin.Forms.InputKit copied to clipboard
RadioButtonGroupView in List View
My Question Here ?
i use RadioButtonGroupView in list view but i can select all radio buttons not only one
<ListView x:Name="OrdersListView" HasUnevenRows="True" Margin="10,5,10,0"
SeparatorVisibility="None" HeightRequest="200">
<ListView.ItemTemplate>
<DataTemplate>
<renders:ExtendedViewCell SelectedBackgroundColor="White">
<StackLayout Margin="10,0,10,0">
<input:RadioButtonGroupView>
<StackLayout Orientation="Horizontal" Margin="0,10,0,5">
<Label Text="{Binding HelpOrderName}" TextColor="Black"
HorizontalOptions="FillAndExpand"
FontSize="13" FontFamily="serif" VerticalOptions="Center"/>
<input:RadioButton Color="#057482" CircleColor="#057482"
VerticalOptions="Center"/>
</StackLayout>
</input:RadioButtonGroupView>
<BoxView HeightRequest="1" HorizontalOptions="FillAndExpand"
Color="Black" Margin="10,0,10,0"/>
</StackLayout>
</renders:ExtendedViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Hello @AhmedAdelGadElkareeem, I think the problem is that you're putting each RadioButton in it's own RadioButtonGroupView (RBGV). Only one RadioButton can be selected per RBGV, but if you have multiple RBGV's, nothing prohibits all the RadioButtons from being selected.
To fix your problem, you need to put all of the RadioButtons in one RBGV.
I hope I'm being clear, --Plaba
Hello @AhmedAdelGadElkareeem, I think the problem is that you're putting each RadioButton in it's own RadioButtonGroupView (RBGV). Only one RadioButton can be selected per RBGV, but if you have multiple RBGV's, nothing prohibits all the RadioButtons from being selected.
To fix your problem, you need to put all of the RadioButtons in one RBGV.
I hope I'm being clear, --Plaba
Yeah, @Plaba is right. If you need generate radio buttons dynamicly you can use SelectionView There is a docuement about it:
Already i put all radio buttons in one Radio group view check my Call code added above you will see what i mean
On Thu, May 16, 2019, 2:51 PM Enis Necipoglu [email protected] wrote:
Hello @AhmedAdelGadElkareeem https://github.com/AhmedAdelGadElkareeem, I think the problem is that you're putting each RadioButton in it's own RadioButtonGroupView (RBGV). Only one RadioButton can be selected per RBGV, but if you have multiple RBGV's, nothing prohibits all the RadioButtons from being selected.
To fix your problem, you need to put all of the RadioButtons in one RBGV.
I hope I'm being clear, --Plaba
Yeah, @Plaba https://github.com/Plaba is right. If you need generate radio buttons dynamicly you can use SelectionView There is a docuement about it:
- Adding dynamicly Radio Buttons https://github.com/enisn/Xamarin.Forms.InputKit/wiki/Adding-dynamicly-RadioButtons
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enisn/Xamarin.Forms.InputKit/issues/133?email_source=notifications&email_token=AHHI4NM7JTK74F2VNJYRS6LPVVKE7A5CNFSM4HMKKZMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVRWSWQ#issuecomment-493054298, or mute the thread https://github.com/notifications/unsubscribe-auth/AHHI4NMQ6YFXNDBEIQHN3L3PVVKE7ANCNFSM4HMKKZMA .