locate element in group radlist

0 Answers 21 Views
ListView
Ioannis
Top achievements
Rank 1
Iron
Ioannis asked on 15 Jan 2024, 11:30 AM
How i change all checkbox values to true from an event ??
<telerikDataControls:RadListView x:Name="InstructionsList"
                                                            IsPullToRefreshActive="False"
                                                            IsPullToRefreshEnabled="False" 
                                                            BackgroundColor="Transparent"
                                                                     VerticalScrollBarVisibility="Always"
                                                                     
                                                            GroupHeaderTapped="InstructionsList_GroupHeaderTapped"
                                                            NativeControlLoaded="InstructionsList_NativeControlLoaded">
                                      
                                        
                                        <telerikDataControls:RadListView.GroupDescriptors>
                                            <telerikListView:PropertyGroupDescriptor PropertyName="GroupDesc"/>
                                        </telerikDataControls:RadListView.GroupDescriptors>
                                        
                                        <telerikDataControls:RadListView.GroupHeaderTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <Label Text="&#x25B8;" Grid.Column="2" Margin="8, 12, 0, 6" FontSize="50" TextColor="{Binding ., Converter={StaticResource EndInstructionsTabGroupHeaderColorConverter}}">
                                                            <Label.Triggers>
                                                                <DataTrigger TargetType="Label" Binding="{Binding IsExpanded}" Value="True">
                                                        <Setter Property="Text" Value="&#x25BE;" />
                                                        </DataTrigger>
                                                        </Label.Triggers>
                                                    </Label>
                                                    <Label Text="{Binding Key}" Grid.Column="1" TextColor="DarkGray" FontAttributes="Bold" VerticalOptions="Center" HorizontalOptions="StartAndExpand" Margin="0,0,0,10" FontSize="18">
                                                        <Label.GestureRecognizers>
                                                        <TapGestureRecognizer Tapped="OnInstructionGroupHeaderDoubleTap" NumberOfTapsRequired="2" CommandParameter="{Binding .}"/>
                                                        </Label.GestureRecognizers>
                                                    </Label>
                                                    <CheckBox x:Name ="ActionCheckBox" IsChecked="{Binding ., Converter={local:EndInstructionsTabGroupHeaderCheckBoxCheckStateConverter}}" CheckedChanged="TaskInstructionGroupItemCheckBox_CheckedChanged" Grid.Column="0" VerticalOptions="Center" HorizontalOptions="End" Color="DarkGray"/>
                                                </Grid>
                                            </DataTemplate>
                                        </telerikDataControls:RadListView.GroupHeaderTemplate>
                                        
                                        <telerikDataControls:RadListView.ItemTemplate>
                                            <DataTemplate>
                                                <telerikListView:ListViewTemplateCell>
                                                    <telerikListView:ListViewTemplateCell.View>
                                                        <telerikPrimitives:RadBorder BackgroundColor="LightBlue" Margin="5" CornerRadius="18" BorderColor="Black">
                                                            <StackLayout Orientation="Horizontal" Style="{StaticResource ListItem}" Padding="0">
                                                                <StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" Spacing="0" Padding="0, 5">
                                                                    <StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" Spacing="5" Padding="5">
 
                                                                        <StackLayout Orientation="Vertical" Margin="0,15,0,0" IsVisible="{Binding isTopListGeneralItem}">
 
                                                                            <Label IsVisible="{Binding isLabelVisible}" Text="{Binding Description}"  FontSize="16"/>
                                                                            
                                                                            <Frame Padding="0"
                                                                                   CornerRadius="5"
                                                                                   HorizontalOptions="FillAndExpand"
                                                                                   BackgroundColor="White"
                                                                                   IsVisible="{Binding isEntryVisible}">
                                                                                <tools:SelectableEntry TextColor="{StaticResource LightBlueColor}"
                                                                                   Text="{Binding Value}"
                                                                                   Keyboard="{Binding KeyboardTypeBasedOnTaskActionResultType}"
                                                                                   TextChanged= "SelectableEntry_TextChanged"
                                                                                   HorizontalOptions="FillAndExpand"
                                                                                   HorizontalTextAlignment="Start"
                                                                                   ReturnType="Done"
                                                                                   VerticalOptions="Center"
                                                                                />
                                                                            </Frame>
 
                                                                            <Picker
                                                                                IsVisible="{Binding isBooleanEntryVisible}"
                                                                                SelectedIndexChanged="Picker_SelectedIndexChanged"
                                                                                BackgroundColor="White"
                                                                                SelectedItem="{Binding Value}"
                                                                            >
                                                                                <Picker.ItemsSource>
                                                                                    <x:Array Type="{x:Type x:String}">
                                                                                        <x:String>True</x:String>
                                                                                        <x:String>False</x:String>
                                                                                    </x:Array>
                                                                                </Picker.ItemsSource>
                                                                            </Picker>
 
                                                                            <Picker
                                                                                IsVisible="{Binding isLookupTaskActionResult}"
                                                                                SelectedIndexChanged="TaskActionResultLookupValuePicker_SelectedIndexChanged"
                                                                                ItemsSource="{Binding TaskInstructionResultLookupValues}"
                                                                                ItemDisplayBinding="{Binding Value}"
                                                                                BackgroundColor="White"
                                                                                SelectedItem="{Binding TaskInstructionResultLookupValueSelectedItemBinding}"/>
 
                                                                            <Label Text="{x:Static resx:Resources.Observations}" FontSize="16" />
                                                                            
                                                                            <Frame Padding="0" CornerRadius="5" IsClippedToBounds="true" HorizontalOptions="FillAndExpand">
                                                                                <tools:SelectableEntry TextColor="Black"
                                                                                    HorizontalOptions="FillAndExpand"
                                                                                    HorizontalTextAlignment="Start"
                                                                                    VerticalOptions="Center"
                                                                                    Text="{Binding CommentsOfParentInstruction}"
                                                                                    ReturnType="Done"
                                                                                />
                                                                            </Frame>
                                                                            
                                                                            <StackLayout x:Name="EstimatedTime" Orientation="Horizontal">
                                                                                <Label Text="{x:Static resx:Resources.EstimatedTime}" Style="{StaticResource Info}" TextColor="Gray" FontSize="12" />
                                                                                <Label Text="{Binding EstimatedDurationOfParentInstruction}" Style="{StaticResource Info}" TextColor="Gray" FontSize="12" />
                                                                            </StackLayout>
                                                                            
                                                                        </StackLayout>
 
                                                                        <StackLayout IsVisible="{Binding isMeasure}">
                                                                            <Label Text="{Binding Description}" Style="{StaticResource MeasureListHeader}" />
                                                                        
                                                                            <StackLayout Orientation="Horizontal">
                                                                                <Label Text="{x:Static resx:Resources.Counterlbl}" Style="{StaticResource MeasureListDetail}" />
                                                                                <Label Text="{Binding MeasurementCounter}" Style="{StaticResource MeasureListDetail}" />
                                                                            </StackLayout>
                                                                    
                                                                            <StackLayout Orientation="Horizontal">
                                                                                <Label Text="{Binding Remarks}" Style="{StaticResource MeasureListDetail}" />
                                                                            </StackLayout>
                                                                        
                                                                            <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" Padding="0, 0, 5, 0">
                                                                                <Frame Padding="0" CornerRadius="5" IsClippedToBounds="true" HorizontalOptions="FillAndExpand">
                                                                                    <tools:SelectableEntry TextColor="{StaticResource LightBlueColor}"
                                                                                                           Text="{Binding Value}"
                                                                                                           Keyboard="Numeric"
                                                                                                           IsVisible="{Binding isMeasure}"
                                                                                                           HorizontalOptions="FillAndExpand"
                                                                                                           HorizontalTextAlignment="center"
                                                                                                           VerticalOptions="Center" />
                                                                                </Frame>
                                                                                <Label Text="{Binding MeasurementUnit}" Style="{StaticResource MeasureListDetail}" VerticalOptions="Center" HorizontalOptions="End" />
                                                                            </StackLayout>
                                                                        </StackLayout>
                                                                        
                                                                    </StackLayout>
                                                                </StackLayout>
                                                            </StackLayout>
                                                        </telerikPrimitives:RadBorder>
                                                    </telerikListView:ListViewTemplateCell.View>
                                                </telerikListView:ListViewTemplateCell>
                                            </DataTemplate>
                                        </telerikDataControls:RadListView.ItemTemplate>
                                    </telerikDataControls:RadListView>
Didi
Telerik team
commented on 16 Jan 2024, 06:36 AM

Hi Ioannis,

Could you please share what event you want to use for changing the CheckBox state, When you tap on a ListView item? When tapping on a checkbox? 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

No answers yet. Maybe you can help?

Tags
ListView
Asked by
Ioannis
Top achievements
Rank 1
Iron
Share this question
or