Intersoft WebGrid Documentation
Customizing Default Style
See Also Send comments on this topic.
Intersoft WebGrid > WebGrid Features Overview > Customizing UI > Customizing Default Style

Glossary Item Box

This topic contains the following sections:

Introduction

New in version 5.0 is the default style concept to deliver optimal performance right out-of-the-box.

The default style feature offers the following benefits:

The following illustration compares the page output between WebGrid and its predecessors.

Several important things to note around Default Style feature:

 

There are couple ways to enable DefaultStyle of WebGrid:

  1. SmartTag Designer.
  2. Property Set.

For more information, see How-to: Enable Default Style for existing instance of WebGrid.

 

Default Style Mode

WebGrid 5.0 comes with two default styles as discussed in the following:

 

Default Style Merging

WebGrid 7 introduces Default Style Merging, a new feature that automatically merges your customized styles with default style.

Default Style, a feature introduced in version 5 is designed to let you easily change WebGrid's theme in a single property set. However, you can no longer customize WebGrid styles when you activate this feature without additional workaround. Default Style Merging is designed to address this limitation, makes it easy for you to customize WebGrid styles while preserving the original default styles.

To enable Default Style Merging feature, simply set AllowDefaultStyleMerging property to true. This new property can be found in LayoutSettings object.

For example, the following screenshot shows WebGrid with Elegant default style.


Next, assume you would like to change the font's color to Red, you would have the following style definition in LayoutSettings.

HTML Copy Code
<ISWebGrid:WebGrid...>        <LayoutSettings...>            <HeaderStyle ForeColor="Red" />        </LayoutSettings></ISWebGrid:WebGrid>

 

The following shows the comparison two different results.

Without Default Style Merging

With Default Style Merging

The header's default style is lost after you defined custom header style.

The header's default style is flawlessly merged with your custom header style.

 

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.