Copy appearance of one cell to another

4 posts, 0 answers
  1. Yuri
    Yuri avatar
    12 posts
    Member since:
    Jun 2011

    Posted 11 Dec 2018 Link to this post

    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!

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3988 posts

    Posted 11 Dec 2018 Link to this post

    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.
  3. Yuri
    Yuri avatar
    12 posts
    Member since:
    Jun 2011

    Posted 12 Dec 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    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.

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3988 posts

    Posted 12 Dec 2018 Link to this post

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