This is a migrated thread and some comments may be shown as answers.

HideSelection doesn't

3 Answers 75 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 23 Nov 2011, 09:00 AM
Hi there,

I am working on a custom theme based on ControlDefault
I have a form containing multiple grids and i want to use the HideSelection property to remove all row and cell highlighting when focusing on a different grid.
I've managed to get the theme to do this mostly, the only part i cant figure out is how to remove the cell highlight (see attached screen shot).

I've removed the border from GridDataCellElement.IsCurrent, but left the one for GridDataCell.IsSelected. it seems like no matter what i try, the border still remains.

Hope someone can help!

Cheers,
Matt

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 25 Nov 2011, 05:43 PM
Hi Matthew,

It seems that there is an issue with the cell styling in this scenario. The HotTracking state is not updated correctly for the cell and it is not possible to disable the cell border by using the Visual Style Builder tool. I added this issue in our issue tracking system and it will be addressed in one of our upcoming releases.

You can work around the issue by using the CellFormatting event. Please consider the sample below:
void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
    if (e.CellElement.IsCurrent && !e.CellElement.RowElement.HotTracking)
    {
        e.CellElement.DrawBorder = false;
        e.CellElement.DrawFill = false;
    }
    else
    {
        e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
        e.CellElement.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local);
    }
}

I hope this helps. If you need further assistance, do not hesitate to ask.
 
All the best,
Jack
the Telerik team

Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

0
Matthew
Top achievements
Rank 1
answered on 27 Nov 2011, 11:24 PM
Hi Jack,

Thanks for your help with this. I've disabled hottracking and that seems to have fixed it.

Regards,
Matt
0
Jack
Telerik team
answered on 30 Nov 2011, 08:56 AM
Hello Matthew,

I am glad that I could help. Should you have any other questions, feel free to contact us.
 
Best wishes,
Jack
the Telerik team

Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

Tags
Themes and Visual Style Builder
Asked by
Matthew
Top achievements
Rank 1
Answers by
Jack
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or