Style Inheritance

Glossary Item Box

Infragistics® NetAdvantage® for ASP.NET (CLR 2.0)

Style Inheritance

The DisplayLayout object's MergeStyles property controls the way the styles are merged in the grid. By default it is set to True, which means that styles inherit properties from parent objects based on the inheritance hierarchy. With this setting, you do not need to specify the appearance settings for every object in the control, or manually set every property on an object when they want to change only single a property's value.

Note: If for some reason you do not want to inherit style properties, MergeStyles can be set to False. In this case, all styles must be supplied with the desired property values.

All properties that can inherit their values have a "use default" setting. If a property is set to "use default" it will inherit its value from the parent object. Most appearance-related properties are set to "use default", by default.

This diagram has been updated to reflect the changes made to WebGrid's style inheritance in order to work with the Application Styling Framework™ (ASF), introduced in 2007 Volume 1. The key change from previous volume releases is that RowStyle doesn't inherit from FrameStyle anymore. This modification was made to minimize the amount of rendered HTML on the client side.

Another change (not shown in the diagram) that was made in 2007 Volume 1 is that Band styles are applied immediately after their grid-level counterparts. For example, if you applied RowStyle and RowAlternateStyle at the grid and band level, these styles will be applied in the following order:

E-mail your feedback on this topic.

Opinion about our help? Take our survey.

Copyright © 1996-2007 Infragistics, Inc. All rights reserved.

Build Version: 7.2.20072.1063