Override theme for one control

2 posts, 0 answers
  1. Steve
    Steve avatar
    2 posts
    Member since:
    Mar 2016

    Posted 28 Mar 2019 Link to this post

    I've got a theme set for my entire project in the App_Themes folder. Within this folder I have a style sheet which, among other things, specifies the style for all radGrids.  I now have a requirement to completely change the style on one particular grid within one user control.  There are other grids in this user control that shouldn't change.

    What's the best way to override the style on one grid on one user control?

    Thanks.

  2. Rumen
    Admin
    Rumen avatar
    14431 posts

    Posted 02 Apr 2019 Link to this post

    Hi Steve,

    You can create your own custom skin for radGrid in the Theme Builder as explained in the documentation https://docs.telerik.com/devtools/aspnet-ajax/theme-builder/overview.

    Once you do that copy the generated css files in the App_Themes or another folder and import them on the page with the grid you want to customize.

    Set the Skin property with the name of the custom skin and the EnableEmbeddedSkins property of this grid to false:

    <telerik:RadGrid ID="RadGrid1" Skin="RedLimeSkin" EnableEmbeddedSkins="false" RenderMode="Lightweight" ...


    The set the Skin property of the other grids on the page to one of the available built-in skins:

    <telerik:RadGrid ID="RadGrid2" runat="server" RenderMode="Lightweight" Skin="Bootstrap" ...


    Make sure that the RenderMode properties of all grids are set to Lightweight.

    For your convenience I recorded and attached a sample video demo.

    Best regards,
    Rumen
    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