Grid Setup Properties

The Grid Setup Properties listed below are available for use with the Grid Display Adapter. Click on a link to go directly to that section.

•    Grid Column Properties XML

•    Grid Conditional Formatting XML

•    Grid Config XML

•    Grid Custom Styles XML

•    Grid Export XML

•    Grid Group Columns XML

•    Grid Sorted Columns XML

•    Grid Text Settings XML

•    Grid Totaling XML

•    Grid Context Menu XML

•    Static Groups XML

Grid Column Properties XML

This is an XML property that is used to override specific columns in the grid. 

The property should contain a root node value of Columns and should contain a child node value of Column for each column in the grid you wish to modify.

AllowGrouping

A Boolean value that controls whether grouping can occur on the column.

Default: True

AllowMultiLine

A Boolean value that controls whether the cells can contain multiple lines of data.

Default: False

AllowSorting

A Boolean value that controls whether sorting is allowed on the column.

Default: True

AllowSizing

A Boolean value that controls whether the column can be sizing.

Default: True

Caption

The string value of the text to be displayed in the column header.

CellImage

The filename of the image that should be displayed in the cells of the column.

CellStyle

The css style used to control the style of the cells under the column.

ColumnMember

The string name of the column to override.

ColumnType

The type of column to set.

Options: Custom(html), Hyperlink, Image, ImageAndText, Text

Default: Text

DataFormatString

The value of the format string used to format the column values.

To have dates or times returned in a different format, use the following parameters.

d

The day of the month. Single-digit days will not have a leading zero.

dd

The day of the month. Single-digit days will have a leading zero.

ddd

The abbreviated name of the day of the week, as defined in AbbreviatedDayNames.

dddd

The full name of the day of the week, as defined in DayNames.

M

The numeric month. Single-digit months will not have a leading zero.

MM

The numeric month. Single-digit months will have a leading zero.

MMM

The abbreviated name of the month, as defined in AbbreviatedMonthNames.

MMMM

The full name of the month, as defined in MonthNames.

y

The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero.

yy

The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.

yyyy

The year in four digits, including the century.

gg

The period or era. This pattern is ignored if the date to be formatted does not have an associated period or era string.

h

The hour in a 12-hour clock. Single-digit hours will not have a leading zero.

hh

The hour in a 12-hour clock. Single-digit hours will have a leading zero.

H

The hour in a 24-hour clock. Single-digit hours will not have a leading zero.

HH

The hour in a 24-hour clock. Single-digit hours will have a leading zero.

m

The minute. Single-digit minutes will not have a leading zero.

mm

The minute. Single-digit minutes will have a leading zero.

s

The second. Single-digit seconds will not have a leading zero.

ss

The second. Single-digit seconds will have a leading zero.

f

The fraction of a second in single-digit precision. The remaining digits are truncated.

ff

The fraction of a second in double-digit precision. The remaining digits are truncated.

fff

The fraction of a second in three-digit precision. The remaining digits are truncated.

ffff

The fraction of a second in four-digit precision. The remaining digits are truncated.

fffff

The fraction of a second in five-digit precision. The remaining digits are truncated.

ffffff

The fraction of a second in six-digit precision. The remaining digits are truncated.

fffffff

The fraction of a second in seven-digit precision. The remaining digits are truncated.

t

The first character in the AM/PM designator defined in AMDesignator or PMDesignator, if any.

tt

The AM/PM designator defined in AMDesignator or PMDesignator, if any.

z

The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will not have a leading zero. For example, Pacific Standard Time is "-8".

zz

The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will have a leading zero. For example, Pacific Standard Time is "-08".

zzz

The full time zone offset ("+" or "-" followed by the hour and minutes). Single-digit hours and minutes will have leading zeros. For example, Pacific Standard Time is "-08:00".

:

The default time separator defined in TimeSeparator.

/

The default date separator defined in DateSeparator.

Position

A numeric value that represents the position order of the columns.

Example:

<Columns>

<Column>

<ColumnMember>Description</ColumnMember>

<Caption>Task Description</Caption>

<ColumnType>Custom</ColumnType>

</Column>

<Column>

<ColumnMember>ObjSiteURL</ColumnMember>

<ColumnType>Hyperlink</ColumnType>

</Column>

</Columns>

Table

When configured as a Parent-Child Grid, the Table Name (i.e., Table 1, Data, etc.) within the XML that identifies what the table that contains the column being modified.

Visible

A Boolean value used to hide or show the column.

Default: True

Width

An integer that is used to control the width of the column. This can be expressed with a percentage symbol.

Back to Top

 

Grid Conditional Format XML

An XML property used to create conditional formats to be applied to the grid. 

To use this property, specify a root node value of Conditions.  The root node should contain Condition Nodes to represent each condition you want to apply.  Each Condition Node should contain values for the elements described below.

NOTE: If your Grid Conditional Format XML includes the greater than or less than character, the text you supply should be wrapped within a CDATA node. For example:

<Conditions><Condition><CustomConditionText><![CDATA[[VacationHours] < 16]]></CustomConditionText><FormatStyle>background:red;color:White;</FormatStyle></Condition></Conditions>

ColumnMember

The name of the column the condition will be checked against.

ConditionText

The string value of the condition to check.

CustomConditionText

Specifies the customized condition of the text you want to format in the grid’s column member.

Example:

<Conditions>

<Condition>

<ColumnMember>Status</ColumnMember>

<ConditionText>In Progress</ConditionText>

<FormatStyle>background:blue;color:White;</FormatStyle>

</Condition>

<Condition>

<CustomConditionText>[Status] like 'd%'</CustomConditionText><FormatStyle>background:red;color:White;</FormatStyle>

</Condition>

</Conditions>

 

Supported Variables:

•    %ME% – The currently logged in user

•    %Today% – Today's date

•    %CurrentWeekStart% – The first day in the current week

•    %CurrentWeekEnd% – The last day in the current week

•    %CurrentMonthStart% – The first day in the current month

•    %CurrentMonthEnd% – The last day in the current month

•    %CurrentYearStart% – The first day in the current year

•    %CurrentYearEnd% – The last day in the current year

•    %Quarter1Start% – The first day in the first quarter of the current year

•    %Quarter1End% – The last day in the first quarter of the current year

•    %Quarter2Start% – The first day in the second quarter of the current year

•    %Quarter2End% – The last day in the second quarter of the current year

•    %Quarter3Start% – The first day in the third quarter of the current year

•    %Quarter3End% – The last day in the third quarter of the current year

•    %Quarter4Start% – The first day in the fourth quarter of the current year

•    %Quarter4End% – The last day in the fourth quarter of the current year

•    %OneWeekAgoStart% – The first day of the previous week

•    %OneWeekAgoEnd% – The last day of the previous week

•    %TwoWeeksAgoStart% – The first day of the week before last

•    %TwoWeeksAgoEnd% – The last day of the week before last

•    %OneWeekFromNowStart% – The first day of next week

•    %OneWeekFromNowEnd% – The last day of next week

•    %TwoWeeksFromNowStart% – The first day of the week after next

•    %TwoWeeksFromNowEnd% – The last day of the week after next

•    %OneMonthAgoStart% – The first day of last month

•    %OneMonthAgoEnd% – The last day of last month

•    %OneMonthFromNowStart% – The first day of next month

•    %OneMonthFromNowEnd% – The last day of next month

Enabled

A Boolean value that specifies whether the condition is enabled.

Default: True

FormatStyle

The string value of the css style to apply if the condition is met.

TargetColumnMember

Specifies the name of the column to apply the format to if the condition is met. This should be used if the TargetObject is set to Cell.

TargetObject

Controls the object that the FormatStyle will be applied to if the condition is met.

Options: Row, Cell

Default: Row

Back to Top

 

Grid Config XML

Controls the UI, as well as the features and functions of the grid.  This property is a string represented by XML and is used by specifying the root node value of the grid. It can contain the elements listed below.

Example:

                                <Grid>
                                                <Enabled>True</Enabled>
                                                <DefaultStyleMode>Standard</DefaultStyleMode>
                                </Grid>

 

 

  Go to fullsize image     Click on this link to see a Related Video
from the CorasWorks Community: Grid Format Columns

 

AllowAutoDataCaching

A Boolean value that specifies whether the grid handles data caching automatically.

Default:  True

AllowColumnFreezing

A Boolean value that, when enabled, makes the Freeze Pane option available when the user right-clicks on the grid. It allows users to select a number of columns that remain stationary so they are always in view as the user scrolls across the grid. This element is used with the MaxFrozenColumns element.

Default: False

AllowColumnMove

A Boolean value that controls whether users can move columns during runtime.

Default: True

AllowColumnSizing

A Boolean value that controls whether users can resize grid columns at runtime.

Default: True

AllowContextMenu

A Boolean value that controls whether the Context menu will be available to users.

Default: True

AllowExport

A Boolean value that controls whether Export is enabled.

Default: False

AllowFilter

A Boolean value that controls whether users can filter items in the grid.

Default: True

AllowGrouping

A Boolean value that controls whether grouping is allowed in the grid.

Default: True

AllowSelectColumns

A Boolean value that controls whether users can select grid columns at runtime and drag them to another location in the grid.

Default: True

AllowSorting

A Boolean value that controls whether sorting can be performed at runtime.

Default: True

AlternatingColors

A Boolean value that controls whether grid rows will have alternating colors.

Default: True

AlwaysShowHelpButton

A Boolean value that controls whether the help button is displayed or not.

Default: True

ApplyFiltersKey

The key value used to run a filter on the grid.

Options: ShiftEnter, Enter

Default: ShiftEnter

AutoColMinWidth

A numeric value for the minimum width of a column if AutoFitColumns is enabled.

Default: 100

AutoFilterSuggestion

A Boolean value that controls whether the grid will display filter suggestions in the Context menu.

Default: False

AutoFitColumns

A Boolean value that controls whether the grid’s columns will be auto-sized to fit the width of the grid.

Default: False

BackColor

The HTML color value of the grid.

Default: Empty

BorderColor

The HTML color value of the grid’s borders.

Default: Black

BorderStyle

The style of the grid’s borders.

Options:

Dashed, Dotted, Double, Groove, Inset, Outset, None, Ridge, Solid

Default: Solid

BorderWidth

A numeric value to set the width of the grid’s borders.

Default: 1

CacheServerConnection

Specifies the file server connection string for grid data cache storage.

Default: empty

CellPadding

A numeric value to set the grid’s cell padding, or the amount of space between a cell’s content and cell border, measured in pixels.

Default: 1

CellSpacing

A numeric value to set the grid’s cell spacing, or the amount of each space between each cell.
Default: 0

ColumnFooters

A Boolean value that controls whether column footers are displayed.

Default: False

ColumnHeaders

A Boolean value that controls whether column headers are displayed.

Default: False

DataCacheStorage

Specifies where to store the grid’s cached data.

Options: Session, Page, FileServer

Default: Page

DefaultStyleMode

The style mode the grid will use if UseDefaultStyle is set to true.

Options: Elegant, Standard

Default: Elegant

Enabled

A Boolean value to enable or disable the grid.

Default: True

FilterBarVisible

A Boolean value that controls whether the filter bar is visible on the grid.

Default: True

ForeColor

The HTML color value to control the text color of the grid.

Default: Black

GridLines

Specifies how gridlines are displayed in the grid.

Options: Both, None, Horizontal, Vertical

Default: Both

GridLineColor

The HTML color for the grid’s gridlines.

Default: Blue

GridLineStyle

Sets the style of the grid’s gridlines.

Options: Dashed, Dotted, Double, Groove, Inset, Outset, None, Ridge, Solid

Default: Solid

GroupByBoxVisible

A Boolean value that controls whether the Group By box will be displayed in the grid.

Default: False

GroupRowInfoDefaultFormat

Specifies the string format to apply to the grid’s group row.

Default: Empty

HeaderClickAction

Specifies how the columns will be sorted.

Options: SortSingle, SortMulti, Non

Default: SortMulti

Height

The height of the grid.

Default:  350

HideColumnsWhenGrouped

A Boolean value that controls whether columns are displayed if they are being grouped on.

Default: True

Hierarchical

A Boolean value that controls whether the grid will display hierarchical data.

Default: False

HierarchicalMode

A balue that controls the operational mode if Hierarchical is enabled.

Options: LoadOnDemand, PreLoad

Default: LoadOnDemand

Initial View (Not Yet Used)

Controls the intial view of the grid.

Options: Both, PivotChartView, PivotChartExclusive, GridView

Default: GridView

InProgressUIBehavior

Controls the action that occurs while the grid is busy.

Options: Message, HourGlass

Default: Message

Language

Sets the language options for the grid.

Options: UseDefault, Custom, Culture

Default:  UseDefault

MaxFrozenColumns

Specifies the maximum number of columns that can be frozen by the user, so up to that number of columns remain stationary as the user scrolls across the grid. Used with the AllowColumnFreezing element.

Default: 0

MenuCssFile

Contains the name of the css file that contains the context menu.

PagingDetectPartialGroupRows

A Boolean value that controls whther the grid will detect partial rows when classic paging is enabled.

Default: False

PagingExportMode

Controls whether the grid will export the entire set of rows when classic paging is enabled.

Options: CurrentPage, ExportAllData

Default: CurrentPage

PagingLatencyOnSlide

A numeric value that controls the amount of time in milliseconds to fetch data when paging is being changed. Only applies when classic paging is enabled and PagingStyleUI is set to slider.

Default: 500

PagingMode

Controls the style of paging.

Options: ClassicPaging, VirtualLoad, None

Default: VirtualLoad

PagingSize

A numeric value that controls the number of rows to display when paging is enabled.

Default: 25

PagingSliderWidth

A numeric value that controls the slider bar width when classic paging is enabled and PagingStyleUI is set to Slider.

Default: 100

PagingStyleUI

Controls the style of paging.

Options: SimpleDropDown, Slider, PrevNext

Default: PrevNext

RowHeaders

A Boolean value that controls whether row headers are displayed in the grid.

Default: False

RowHeightDefault

A numeric value that controls the default height of the rows in the grid.

Default: 20

RowHeaderWidth

A numeric value that controls the width of the row headers, if enabled.

Default: 18

RowHighlightType

Sets the highlight type when a row is selected.

Options: BackgroundOnly, EntireRow

Default: EntireRow

ShowFilterStatus

A Boolean value that controls whether the filter status is displayed in the grid’s status bar.

Default: False

ShowRefreshButton

A Boolean value that controls whether the Refresh button is displayed in the grid’s status bar.

Default: True

StateRestorationLevel

Specifies the state level value that the grid uses to restore itself. This determines the amount of information that is restored when the page is created and posted back. Page size is affected by the StateRestorationLevel, but CorasWorks recommends keeping the default of "High."

Options: Low, Medium, High

Default: High

StatusBarVisible

A Boolean value that controls whether the status bar is displayed.

Default: True

TreeLines

A Boolean value that controls whether tree lines are visible when hierarchical mode is enabled.

Default: False

UseDefaultStyle

A Boolean value that enables the grid to use the default-built in styling. Enabling this improves rendering performance.

Default: True

ViewStateServerConnection

Specifies the connection string for file-based viewstate storage.

ViewStateStorage

Specifies where the grid will store its viewstate information.

Options: Client, None, Session, Page, FileServer

Default: Page

VirtualLoadMode

Controls the grid’s load mechanism when retrieving and displaying data.

Options: LargeData, Default

Default: Default

VirtualPageSize

A numeric value that controls the number of rows to load when the paging mode is set to VirtualLoad.

Default: 50

Width

The width of the grid.

Default: Gets width from the parent container

Back to Top

 

Grid Custom Styles XML

An XML string property that allows you customize various UI elements of the grid with css. 

The property should contain a root node value of Styles.  The Styles node should contain Style child nodes.  Each Style node should contain one of the following Style elements with the specified css:

FrameStyle

AlternatingRowStyle

RowStyle

SelectedRowStyle

HeaderStyle

FooterStyle

StatusBarStyle

PreviewRowStyle

LostFocusRowStyle

FilterRowStyle

QuickFilterBarStyle

SortedColumnStyle

RowHeaderStyle

HyperlinkStyle

GroupRowInfoStyle

 

Example:

                <Styles>
                                <Style>
                                                <HeaderStyle>background: blue; color:white</HeaderStyle>
                                </Style>
                </Style>

 - OR -

The property should contain a root node value of Styles.  The Styles node should contain Class child nodes.  Each Class node should contain one of the following Class elements with the specified css class from a style statement.

FrameStyleCssClass

AlternatingRowStyleCssClass

RowStyleCssClass

SelectedRowStyleCssClass

HeaderStyleCssClass

FooterStyleCssClass

StatusBarStyleCssClass

PreviewRowStyleCssClass

LostFocusRowStyleCssClass

FilterRowStyleCssClass

QuickFilterBarStyleCssClass

SortedColumnStyleCssClass

RowHeaderStyle CssClass

HyperlinkStyleCssClass

GroupRowInfoStyleCssClass

 

Example:

                <Styles>
                                <Class>
                                                <HeaderStyleCssClass>background: blue; color:white</HeaderStyleCssClass>
                                </Class>
                </Style>

Back to Top

 

Grid Export XML

This allows you to enable and set up the export of data from the data grid.  This property should contain a root node value of ExportInfo along with the elements described below.

IISReportPath

A string that specifies the virtual report path for the temporary reports exported by the grid.

ReportPath

A string that specifies the physical report path for the temporary reports exported by the grid.

DeleteOutputFileTile

A numeric value that specifies how many minutes the temporary file is cached before it is deleted from the server.

Default: 5

Back to Top

 

Grid Group Columns XML

This is an XML property that allows you to set up grouped columns to be displayed in the grid.

The property should contain a root node value of Grouping. The root node Grouping should contain child node value Group, which will represent each grouping you want to setup in the grid. Each Group node will contain the following elements.

ColumnMember

The string value of the column name you want to group on.

GroupEmptyString

A string value that is displayed in a group row when the value is null or an empty string.

Example:

                <Groups>
                                <Group>
                                                <ColumnMember>Status</ColumnMember>
                                                <GroupMode>Expanded</GroupMode>
                                </Group>
                </Groups>

GroupInterval

Controls how the grouped values should be calculated.

Options: Default, Value,Text, Alphabetical, Date, Month, Year, Hour, Minute, ShortTime, Quarterly, NamedPeriod

Default: Value

GroupMode

Specifies the grouping mode of the column being  grouped.

Options: Collapsed, Expanded, Default

Default: Collapsed

SortOrder

Sets the sort order of the grouped column.

Options: Ascending, Descending, Disabled, None

Default: None

Back to Top

 

Grid Sorted Columns XML

This is used to set up the default sort orders on the grid columns. This is an XML string and should have a root node value of Columns and child node values of Column for each column for which you want to set up sorting.

ColumnMember

The title of the column.

SortOrder

The order (direction) to sort the column in.

Options: Ascending, Descending, Disabled, None

Default: None

Example:

<Columns>

<Column>

<ColumnMember>Priority</ColumnMember>

<SortOrder>descending</SortOrder>

</Column>

<Column>

<ColumnMember>Title</ColumnMember>

<SortOrder>ascending</SortOrder>

</Column>

</Columns>

Back to Top

 

Grid Text Settings XML

A string property in an XML format that allows you to override and customize the common text values displayed in the user interface of the grid.

To use this property, specify a root node value of TextSettings. The TextSetting root node should contain Item child nodes. Each Item child node will contain TextSection, TextItem, and TextValue nodes. The TextItem node will contain the text value displayed in the grid that you would like to override. The TextValue node will contain the new value you would like to show in the grid.

The TextSection should contain one of the following sections found below:

•    CommonText

•    MessageBoxText

•    Tooltip

•    Grouping

•    ContextMenu/Column

•    ContextMenu/Row

•    ContextMenu/FilterSuggest

•    ContextMenu/Filter

•    ContextMenu/Export

•    ContextMenu/Paging

Example:

                                <TextSettings>

                                                <Item>

                                                                <TextSection>CommonText</TextSection>

                                                                <TextItem>Ready</TextItem>

                                                                <TextValue>Waiting for user input</TextValue>

                                                </Item>

                                </TextSettings>

Back to Top

 

Grid Totaling XML

An XML  string property that is used to set up and enable totaling in the column footers and/or group totals.  The property should include a root node value of Totaling with Item child node values representing each totaling value to display.

AggregateFunction

The type of totaling function to perform.

Options: Avg, Count, Max, Min, Sum

ColumnMember

The string value of the name of the column member to perform totaling on.

FooterText

The text that will be displayed in the column footer.

GroupRowInfoFormat

Sets the string format of the group row.

GroupTotalVisible

A Boolean value that enables the group row total.

Example:

                <Totaling>

<Item>

<GroupRowInfoFormat>[value]: - Rows [count] || Sum of ListID = [sum(ListID)]</GroupRowInfoFormat>

<ColumnMember>Priority</ColumnMember>

</Item>

<Item>

<GroupRowInfoFormat>[value]: Count [count] - Avg [avg(ListID)]  Sum [sum(ListID)]</GroupRowInfoFormat>

<ColumnMember>Assigned To</ColumnMember>

</Item>

<Item>

<ColumnMember>ListID</ColumnMember>

<AggregateFunction>sum</AggregateFunction>

<FooterText>Sum:</FooterText>

</Item>

<Item>

<ColumnMember>ListID</ColumnMember>

<AggregateFunction>sum</AggregateFunction>

<FooterText>Sum:</FooterText>

</Item>

</Totaling>

Back to Top

 

Grid Context Menu XML

This is used to set up the context menus that are displayed when a user right mouse clicks on an item within the grid.

Columns

A string value that represents the grid columns that will be accessed and used within the Link node. Each column specified must be separated by a "|" and therefore must not contain either a "|" or "’" in their name. The column is referenced by Column Member name and not display/caption name.

Example: Column1|Column2|Column3|ID

Confirm

Causes an alert window to pop up when a context menu item is chosen, requiring the user to confirm their choice.

Options: True, False

Default: False

ConfirmText

A string value that is displayed in the Confirm alert window.

ID

A string value used in JavaScript to identify the context menu in the grid. This must be unique for each context menu item and must not contain any special characters, including spaces.

Image

A string value which is a URL to the image that will displayed next to the text of the item in the context menu. The size of the image should be 16x16.

IncludeSource

If this is activated, the context menu URL will include "?Source=" and the current page URL where the grid resides. Do not use this option if the link you are connecting to exists outside of the current site collection.

Options: True, False

Default: False

Example:

<Menu>

<Item>

<ID>PriorityFormDisplay</ID>

<OpenInNewWindow>False</OpenInNewWindow>

<ValueType>Text</ValueType>

<Confirm>False</Confirm>

<ConfirmText>Are You Sure?</ConfirmText>

<Link>priorityform.aspx?cwformtype=display&amp;id=%PKPriority_ID%</Link>

<Columns>PKPriority_ID</Columns>

<Image>../PMImages/view.png</Image>

<Text>Display Priority</Text>

<IncludeSource>True</IncludeSource>

</Item>

<Item>…</Item>

</Menu>

Link

A string value that is linked when a context menu item is chosen. To include content from one of the columns displayed in the grid, wrap the Column Member name in a % and specify that column name in the "Columns" node.

Example: http://site.com/default.aspx?id=%ID%

javascript: mymethod();

OpenInNewWindow

Causes a new window to open when a context menu item is chosen.

Options: True, False

Default: False

ValueType

Controls whether or not the foreground text or the background value is collected when the "Columns" node is specified. (Value is currently unsupported – Future Feature)

Options: Text, Value

Default: Text

Text

A string value which is the text that will be displayed to the user when they activate the context menu.

Back to Top

 

Static Groups XML

Use this property to control any static groups you want displayed within the Grid Display.  

XML Property Example:

<StaticGroups>

                <StaticGroup>

                                <Display><![CDATA[Company Contains Microsoft AND Status = Not Started]]></Display>

                                <Condition><![CDATA[Company LIKE '%Microsoft' AND Status = 'Not Started']]></Condition>

                </StaticGroup>

</StaticGroups>

 

For each static group you want to have displayed in the grid, you must provide a StaticGroup child member of the StaticGroups parent node.  The StaticGroup child node has two child node members, Display and Condition.

•    Display: This node controls the text that will be displayed in the static groups row header.

•    Condition:  This node controls the filter that will group the grid items into any static groups.

Back to Top