We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Site wide theming

Thread ID:

Created:

Updated:

Platform:

Replies:

88257 Jul 17,2009 11:18 PM UTC Jul 21,2009 04:18 AM UTC ASP.NET MVC (Classic) 3
loading
Tags: Grid
Eric Swann
Asked On July 17, 2009 11:18 PM UTC

Is there a way in the MVC grid/tools to apply a specific theme sitewide (other than blue), possibly through configuration or CSS. The only examples I see apply the theme to each control individually.

Thanks,
Eric

Muthukumar L [Syncfusion]
Replied On July 20, 2009 05:11 AM UTC

Hi Eric,

Thanks for evaluating Syncfusion products.

The final release of Essential Studio ASP.NET MVC Edition is available for download from the following location.

http://www.syncfusion.com/downloads

We would suggest you to use our latest version packed with more features and more stability.

We regret to let you know that currently we don’t support site wide theme by a single line of configuration. You need to set the AutoFormat property or define your custom css and set it common for all the controls. Please find the following code snippet.

AutoFormat Property is used for setting pre-defined themes
DatePickerModel datepickerModel = new DatePickerModel();
datepickerModel.AutoFormat = Skins.Office2007Black;

CssClass property is used for setting Custom themes.
DatePickerModel datepickerModel = new DatePickerModel();
datepickerModel.CssClass = "Forest";


Site wise themes can be achieved by just setting the themes for all controls.

Note: “CssClass” is having different name in Grid and Tree View controls. This property has named as “CustomCss”
AutoFormat property is having different name in Tree View and RTE. It has named as “Skin”.


We currently support four themes (Office2007Blue, Office2007Black, Office2007Silver, Vista) for all our controls and Office2007Blue is our default theme.

Please let us know if this helps.

Regards,
Muthukumar.L

Eric Swann
Replied On July 20, 2009 11:04 PM UTC

Thanks for the response. In case it benefits anybody else, the way I'm handling consistency is the following:

1) I have a common BaseController that all my controllers inherit from.
2) I have some factory methods in this base controller which initialize the appropriate PropertiesModel class, the following example is for the grid, but the same approach was taken for all SyncFusion controls:

public GridPropertiesModel CreateGridProperties()
{
return new GridPropertiesModel()
{
//Set any common grid properties
AutoFormat = Skins.Vista,
PrimaryKeyColumns = { "Id" }
};
}

3) On all of my inherited controllers, instead of creating a GridPropertiesModel from scratch, I get one from the factory method above and then set the remaining properties such as the DataSource.

--Now if I want to change skins, I just change the one line in the BaseController.





Muthukumar L [Syncfusion]
Replied On July 21, 2009 04:18 AM UTC

Hi Eric,

Thanks you very much for sharing your views with us.

It is definitely useful for others. We can move all the common things such as database connectivity, Common properties and all other common code to the base Controller.

Thanks for your time.

Regards,
Muthukumar.L

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;