Intersoft WebGrid Documentation
Rich Styles
See Also Send comments on this topic.
Intersoft WebGrid > WebGrid Features Overview > Styling > Rich Styles

Glossary Item Box

WebGrid allows you to completely customize its appearance, look and behavior. The core style object is implemented in WebGridFormatStyle class, which contains numerous appearance-related such as BackColor, Font, BorderColor and so on. It is implemented by all UI elements such as Rows and Cells. The WebGridFormatStyle also allows you to put custom CSS Rules with the CustomRules property.

WebGrid's UI Elements that support the style customization through WebGridFormatStyle are:

 

 

 

 

 

All of the styles above are accessible through LayoutSettings property, the centralized repository for all appearance and behavior-related settings. Most of element's styles support property inheritance, in which higher-level object's settings will override all lower-level object's settings which has "default" setting.

The WebGridFormatStyle itself contains numerous appearance-related settings including:

Some UI Elements' styles are defined separately and individually in their specific object holder such as GroupBox and FocusCellStyle, which are also contained in LayoutSettings property. You can also change the images used in WebGrid with your own in ImageSettings, which is also under the LayoutSettings property.

Developers generally have 2 considerations while customizing the styles of WebGrid:

Property inheritance example:

C# Copy Code
// This setting affects all WebGrid's hierarchy including all tables and columns to allow sorting.
LayoutSettings.AllowSorting = "Yes"
C# Copy Code
// This setting affects all tables to allow sorting, except tblCustomers.
LayoutSettings.AllowSorting = "Yes"
tblCustomers.AllowSorting = "No"
C# Copy Code
// This setting affects all tables and columns to allow sorting, except the the "FirstName" column of tblCustomers.
LayoutSettings.AllowSorting = "Yes"
tblCustomers.Columns.GetNamedItem("FirstName").AllowSorting = "No"

 

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.