Double click in the grid refreshes the selected picker filed in all rows. How to make this stable with the selected value?

1 Answer 43 Views
DataGrid ListPicker
Mytheli
Top achievements
Rank 1
Mytheli asked on 25 Oct 2023, 08:29 AM | edited on 25 Oct 2023, 09:49 AM
I am using a picker column in a grid for all rows. When I double-click anywhere in the rows, all the selected values refresh and ask to 'Select a bin' again.  Also, there are no click events triggered in the grid. How to solve this issue?
      <telerikDataGrid:DataGridPickerColumn PropertyName="BinName" HeaderText="Dest_Bin" CanUserEdit="False">
                                <telerikDataGrid:DataGridPickerColumn.CellContentTemplate>
                                    <DataTemplate>
                                        <StackLayout Orientation="Horizontal">
                                            <Picker x:Name="BinPicker" Title="Select a Bin" ItemsSource="{Binding Dest_BinList, Converter={StaticResource BinSiteListConverter}}" SelectedItem="{Binding BinName}" SelectedIndexChanged="SiteBinPicker_SelectedIndexChanged" TextColor="Black" TitleColor="Coral" FontSize="15" >
                                            </Picker>
                                        </StackLayout>
                                    </DataTemplate>
                                </telerikDataGrid:DataGridPickerColumn.CellContentTemplate>
                            </telerikDataGrid:DataGridPickerColumn>

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 27 Oct 2023, 12:55 PM

Hello Mytheli,

Thank you for the provided code. Let me get straight to the questions:

Picker columns:

We have this behavior logged here: https://feedback.telerik.com/xamarin/1530073-datagrid-picker-s-selected-item-is-reset-when-pick-an-item-from-another-picker-column 

The workaround is using a Template column and add Picker to the cell content template.

Click events:

There isn't an event, there is a command - CellTap command that executes when tapping on a cell/row. All commands are described here https://docs.telerik.com/devtools/xamarin/controls/datagrid/commands/commands 

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.

Tags
DataGrid ListPicker
Asked by
Mytheli
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or