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

Copy appearance of one cell to another

3 Answers 105 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Yuri
Top achievements
Rank 1
Yuri asked on 11 Dec 2018, 09:34 AM

Hi dear Telerik team.

I have a VirtualGrid.

I have made workaround to substitute indent cell of a row with a text, lets call it "row header".

And I would like to know how can I deal to make "row header" looks absolutely the same as "column header" by the easiest way?

Please find attachment bellow.

Much thanks!

 

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Dec 2018, 11:58 AM
Hello, Yuri,    

The easiest way to customize some of the virtual grid's cells is to use the CellFormatting event. Thus, considering the row/column index, you can apply the desired style. Please refer to the following help article which is quite useful on this topic: https://docs.telerik.com/devtools/winforms/controls/virtualgrid/cells/formatting-data-cells  

You can refer to our Demo application >> VirtualGrid >> Formatting example as well. RadControlSpyForm is quite useful for inspecting different elements in order to style the desired cells.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Yuri
Top achievements
Rank 1
answered on 12 Dec 2018, 09:36 AM
Thank you for your reply.

Could you please answer is there a way to fully copy style of one cell to another?

Except copying each property directly.

I suppose "column header" appearance can change depending on theme, and I would like to make "row header" looks accordingly.

Thank you very much.

Thank you for your reply.

Could you please answer is there a way to fully copy style of one cell to another,

except coping each property directly.

I suppose "column header" appearance style could change depending on theme, and I would like to make "row header" looks accordingly.

Thank you very much.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Dec 2018, 01:04 PM
Hello, Yuri,     

You can't copy the style of a specific cell element to another. The style for each cell element in RadGridView comes from the applied theme. You can use Visual Style Builder and inspect what repository items are applied to the header cell and use similar repository items for the column header. After customizing the theme, you can save the changes and apply the custom theme to the entire application.
You can read more details about using the Visual Style Builder here:
1.     Loading predefined themes
2.     Working with Repository Items
3.     Saving and Loading Theme Files
4.     Loading Themes from an External File
5.     Loading Themes from a Resource
6.     Applying Theme to a Control
7.     
http://tv.telerik.com/watch/winforms/visualstylebuilder/whats-new-visual-style-builder-q1-2010

Alternatively, you can use the already suggested solution with handling the ViewCellFormatting event. 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Should you have further questions please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
VirtualGrid
Asked by
Yuri
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Yuri
Top achievements
Rank 1
Share this question
or