[PROBLEM] Telerik RadGridView, selection and pinned/unpinned columns.

1 Answer 101 Views
GridView
Bexel Consulting
Top achievements
Rank 1
Iron
Bexel Consulting asked on 11 Mar 2022, 03:17 PM

Dear Telerik Team,

We noticed an issue with a selection and pinned/unpinned columns in Telerik RadGridView.

Here is a detailed description of the issue:

There are several columns in our Telerik RadGridView.
The first two columns are pinned, the rest is unpinned.
When we use the SHIFT/CTRL button on a keyboard to select multiple rows and click on a concrete cell in the last selected row (the cell is in the 'Total' column - unpinned column), everything is right with the selection (attachment: Screenshot_1).
On the other hand, when we select a different concrete cell in the last selected row (the cell is in the 'Name' column - pinned column), the selection becomes wrong (attachment: Screenshot_2).

We think there is a difference in behavior between pinned and unpinned columns during selection.

Do you have any useful knowledge about the described issue?

Thank you in advance for your response.

Best regards.

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 16 Mar 2022, 10:37 AM

Hi Veljko Janjic, 

Thank you for the provided images.

We are already aware of this behavior and it is logged in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

Currently, the possible solution that I can suggest is to use the CellFormatting event (I am assuming that you are using TelerikMetroBlue theme) and apply the selected color to the BackColor for the selected cells belonging to the currently pinned column: 

private void RadGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
    if (e.Row.IsSelected && e.Column.IsCurrent)
    {
        e.CellElement.BackColor = Color.FromArgb(234, 249, 255);
    }
    else
    {
        e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
    }
}

I hope this approach will work for you.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
GridView
Asked by
Bexel Consulting
Top achievements
Rank 1
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or