RadDataGrid flickering issue

2 posts, 0 answers
  1. Martin
    Martin avatar
    18 posts
    Member since:
    Oct 2018

    Posted 22 Nov 2018 Link to this post

    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>

     

     

     

  2. Didi
    Admin
    Didi avatar
    379 posts

    Posted 23 Nov 2018 Link to this post

    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
Back to Top