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

Override theme for one control

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 28 Mar 2019, 06:03 PM

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.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Apr 2019, 12:51 PM
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.
Tags
Grid
Asked by
Steve
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or