This is a migrated thread and some comments may be shown as answers.
RadDataGrid flickering issue
1 Answer 20 Views
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 22 Nov 2018, 11:56 AM

Hello all together,

in my RadDataGrid I have a label as DataTemplate. I'm setting the labels text color according to it's binding value "IsSelected" to white or black. I works very well. It is the same solution as for highlighting a tree item in the RadTreeView https://www.telerik.com/forums/highlighting-selected-treeview-item

The problem is, the whole RadDataGrid is flickering when the labels text colors are changing after an item tap, and the RadTreeView is not.

What's the problem with RadDataGrid?

 

Thank you,

best regards

Martin

 

 

Xaml to highlight the selected RadDataGrid-Item:

<telerikGrid:RadDataGrid.SelectionStyle>
    <telerikGrid:DataGridBorderStyle BackgroundColor="{StaticResource CustomerColor}" BorderThickness="0"/>
</telerikGrid:RadDataGrid.SelectionStyle>
<telerikGrid:RadDataGrid.Columns>
    <telerikGrid:DataGridTemplateColumn HeaderText="">
        <telerikGrid:DataGridTemplateColumn.CellContentTemplate>
            <DataTemplate>
                <Label Text="{Binding Name}"
                    HeightRequest="44"
                    Margin="10,0,10,0"
                    FontSize="14"               
                    HorizontalOptions="FillAndExpand"
                    HorizontalTextAlignment="Start"                                 
                    VerticalTextAlignment="Center"
                    VerticalOptions="FillAndExpand"
                    TextColor="{Binding IsSelected,
                        Converter={StaticResource IsHighlightedToColorConverter},
                        ConverterParameter={x:Static ctrls:BooleanColor.SelectedItemColor}}" />
            </DataTemplate>
        </telerikGrid:DataGridTemplateColumn.CellContentTemplate>
    </telerikGrid:DataGridTemplateColumn>
</telerikGrid:RadDataGrid.Columns>

 

 

 

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 23 Nov 2018, 01:22 PM
Hello Martin,

Tank you for the provided code and detailed explanation.

I have tested the described scenario and I reproduced the issue. It seems that the BeginEdit command is called when double tap on the DataGrid TemplateColumn. This behavior is expected to occurs on the TemplateColumn in cases when the BeginEdit (double tap) is called in another column (TextColumn, etc.). 

I have logged this in our Feedback portal and you could follow the item on the provided link: https://feedback.progress.com/Project/168/feedback/Details/259278-datagrid-beginedit-is-called-when-double-tap-on-the-templatecolumn. You can also find your Telerik points updated for this report.

Currently the workaround I could suggest is to handle the BeginEdit action as a Command and implement a logic that does not trigger the BeginEdit command when the column is DataGridTemplateColumn. Please take a look at the MainPage.xaml in the attached project for more details.

Let me know if you have any additional questions or concerns.

Regards,
Didi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Martin
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or