Xamarin.Forms.InputKit icon indicating copy to clipboard operation
Xamarin.Forms.InputKit copied to clipboard

RadioButtonGroupView in List View

Open AhmedAdelGadElkareeem opened this issue 5 years ago • 3 comments

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>

AhmedAdelGadElkareeem avatar May 12 '19 13:05 AhmedAdelGadElkareeem

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

Plaba avatar May 13 '19 15:05 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:

enisn avatar May 16 '19 12:05 enisn

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:

— 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 .

AhmedAdelGadElkareeem avatar May 16 '19 12:05 AhmedAdelGadElkareeem