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

Custom cell background

5 Answers 118 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vnd
Top achievements
Rank 1
vnd asked on 24 Jun 2010, 12:16 PM
I need to paint the grid cell with custom brush, depending on value of the cell. Is it possible with RadGridView ?

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Jun 2010, 12:30 PM
Hello,

 Please check this demo for more info.

Best wishes,
Vlad
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Sven J
Top achievements
Rank 2
answered on 24 Jul 2012, 10:49 AM
Hi,

is it possible to make the tracking (mouse hover) & selection bar appear infront of the cell background when implementing a CellStyleSelector? When implementing a RowStyleSelector the background of the row is behind the tracking/selection bar.  

Thanks
Sven
0
Vanya Pavlova
Telerik team
answered on 25 Jul 2012, 09:39 AM
Hi Sven,

 

You should set the SelectionUnit property of RadGridView to Cell to achieve your goal. 


Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sven J
Top achievements
Rank 2
answered on 26 Jul 2012, 11:32 AM
Hi,

thank you for your response. I'd like to stay with SelectionUnit as Row because in my case the user has to select a row not a cell. So UI should do, too. Any other suggestions?

Thank you in advance
Sven
0
Vanya Pavlova
Telerik team
answered on 26 Jul 2012, 12:43 PM
Hello Sven,

 

Another possibility is to predefine the template of GridViewRow and position the Border elements which is responsible for MouseOver/Selection effects on the Top of the DataCellsPresenter (element responsible for displaying GridViewCells). These elements use colors with no Transparency - so if you want to apply some cell style and maintain these Borders on the top of the cell's Background you should use colors, which allow transparency. Otherwise the content of the cells will be lost. 
I have prepared small sample demo which illustrates how this can be achieved.  



Regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
vnd
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Sven J
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or