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 Conditional Formatting 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.
A Boolean value that controls whether grouping can occur on the column.
Default: True
A Boolean value that controls whether the cells can contain multiple lines of data.
Default: False
A Boolean value that controls whether sorting is allowed on the column.
Default: True
A Boolean value that controls whether the column can be sizing.
Default: True
The string value of the text to be displayed in the column header.
The filename of the image that should be displayed in the cells of the column.
The css style used to control the style of the cells under the column.
The string name of the column to override.
The type of column to set.
Options: Custom(html), Hyperlink, Image, ImageAndText, Text
Default: Text
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. |
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>
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.
A Boolean value used to hide or show the column.
Default: True
An integer that is used to control the width of the column. This can be expressed with a percentage symbol.
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>
The name of the column the condition will be checked against.
The string value of the condition to check.
Specifies the customized condition of the text you want to format in the grids 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
A Boolean value that specifies whether the condition is enabled.
Default: True
The string value of the css style to apply if the condition is met.
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.
Controls the object that the FormatStyle will be applied to if the condition is met.
Options: Row, Cell
Default: Row
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>
Click on
this link to see a Related Video
from the CorasWorks Community: Grid Format
Columns
A Boolean value that specifies whether the grid handles data caching automatically.
Default: True
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
A Boolean value that controls whether users can move columns during runtime.
Default: True
A Boolean value that controls whether users can resize grid columns at runtime.
Default: True
A Boolean value that controls whether the Context menu will be available to users.
Default: True
A Boolean value that controls whether Export is enabled.
Default: False
A Boolean value that controls whether users can filter items in the grid.
Default: True
A Boolean value that controls whether grouping is allowed in the grid.
Default: True
A Boolean value that controls whether users can select grid columns at runtime and drag them to another location in the grid.
Default: True
A Boolean value that controls whether sorting can be performed at runtime.
Default: True
A Boolean value that controls whether grid rows will have alternating colors.
Default: True
A Boolean value that controls whether the help button is displayed or not.
Default: True
The key value used to run a filter on the grid.
Options: ShiftEnter, Enter
Default: ShiftEnter
A numeric value for the minimum width of a column if AutoFitColumns is enabled.
Default: 100
A Boolean value that controls whether the grid will display filter suggestions in the Context menu.
Default: False
A Boolean value that controls whether the grids columns will be auto-sized to fit the width of the grid.
Default: False
The HTML color value of the grid.
Default: Empty
The HTML color value of the grids borders.
Default: Black
The style of the grids borders.
Options:
Dashed, Dotted, Double, Groove, Inset, Outset, None, Ridge, Solid
Default: Solid
A numeric value to set the width of the grids borders.
Default: 1
Specifies the file server connection string for grid data cache storage.
Default: empty
A numeric value to set the grids cell padding, or the amount of space between a cells content and cell border, measured in pixels.
Default: 1
A numeric value to set the grids cell spacing, or the amount
of each space between each cell.
Default: 0
A Boolean value that controls whether column footers are displayed.
Default: False
A Boolean value that controls whether column headers are displayed.
Default: False
Specifies where to store the grids cached data.
Options: Session, Page, FileServer
Default: Page
The style mode the grid will use if UseDefaultStyle is set to true.
Options: Elegant, Standard
Default: Elegant
A Boolean value to enable or disable the grid.
Default: True
A Boolean value that controls whether the filter bar is visible on the grid.
Default: True
The HTML color value to control the text color of the grid.
Default: Black
Specifies how gridlines are displayed in the grid.
Options: Both, None, Horizontal, Vertical
Default: Both
The HTML color for the grids gridlines.
Default: Blue
Sets the style of the grids gridlines.
Options: Dashed, Dotted, Double, Groove, Inset, Outset, None, Ridge, Solid
Default: Solid
A Boolean value that controls whether the Group By box will be displayed in the grid.
Default: False
Specifies the string format to apply to the grids group row.
Default: Empty
Specifies how the columns will be sorted.
Options: SortSingle, SortMulti, Non
Default: SortMulti
The height of the grid.
Default: 350
A Boolean value that controls whether columns are displayed if they are being grouped on.
Default: True
A Boolean value that controls whether the grid will display hierarchical data.
Default: False
A balue that controls the operational mode if Hierarchical is enabled.
Options: LoadOnDemand, PreLoad
Default: LoadOnDemand
Controls the intial view of the grid.
Options: Both, PivotChartView, PivotChartExclusive, GridView
Default: GridView
Controls the action that occurs while the grid is busy.
Options: Message, HourGlass
Default: Message
Sets the language options for the grid.
Options: UseDefault, Custom, Culture
Default: UseDefault
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
Contains the name of the css file that contains the context menu.
A Boolean value that controls whther the grid will detect partial rows when classic paging is enabled.
Default: False
Controls whether the grid will export the entire set of rows when classic paging is enabled.
Options: CurrentPage, ExportAllData
Default: CurrentPage
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
Controls the style of paging.
Options: ClassicPaging, VirtualLoad, None
Default: VirtualLoad
A numeric value that controls the number of rows to display when paging is enabled.
Default: 25
A numeric value that controls the slider bar width when classic paging is enabled and PagingStyleUI is set to Slider.
Default: 100
Controls the style of paging.
Options: SimpleDropDown, Slider, PrevNext
Default: PrevNext
A Boolean value that controls whether row headers are displayed in the grid.
Default: False
A numeric value that controls the default height of the rows in the grid.
Default: 20
A numeric value that controls the width of the row headers, if enabled.
Default: 18
Sets the highlight type when a row is selected.
Options: BackgroundOnly, EntireRow
Default: EntireRow
A Boolean value that controls whether the filter status is displayed in the grids status bar.
Default: False
A Boolean value that controls whether the Refresh button is displayed in the grids status bar.
Default: True
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
A Boolean value that controls whether the status bar is displayed.
Default: True
A Boolean value that controls whether tree lines are visible when hierarchical mode is enabled.
Default: False
A Boolean value that enables the grid to use the default-built in styling. Enabling this improves rendering performance.
Default: True
Specifies the connection string for file-based viewstate storage.
Specifies where the grid will store its viewstate information.
Options: Client, None, Session, Page, FileServer
Default: Page
Controls the grids load mechanism when retrieving and displaying data.
Options: LargeData, Default
Default: Default
A numeric value that controls the number of rows to load when the paging mode is set to VirtualLoad.
Default: 50
The width of the grid.
Default: Gets width from the parent container
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>
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.
A string that specifies the virtual report path for the temporary reports exported by the grid.
A string that specifies the physical report path for the temporary reports exported by the grid.
A numeric value that specifies how many minutes the temporary file is cached before it is deleted from the server.
Default: 5
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.
The string value of the column name you want to group on.
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>
Controls how the grouped values should be calculated.
Options: Default, Value,Text, Alphabetical, Date, Month, Year, Hour, Minute, ShortTime, Quarterly, NamedPeriod
Default: Value
Specifies the grouping mode of the column being grouped.
Options: Collapsed, Expanded, Default
Default: Collapsed
Sets the sort order of the grouped column.
Options: Ascending, Descending, Disabled, None
Default: None
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.
The title of the column.
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>
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>
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.
The type of totaling function to perform.
Options: Avg, Count, Max, Min, Sum
The string value of the name of the column member to perform totaling on.
The text that will be displayed in the column footer.
Sets the string format of the group row.
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>
This is used to set up the context menus that are displayed when a user right mouse clicks on an item within the grid.
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
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
A string value that is displayed in the Confirm alert window.
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.
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.
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&id=%PKPriority_ID%</Link>
<Columns>PKPriority_ID</Columns>
<Image>../PMImages/view.png</Image>
<Text>Display Priority</Text>
<IncludeSource>True</IncludeSource>
</Item>
<Item> </Item>
</Menu>
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();
Causes a new window to open when a context menu item is chosen.
Options: True, False
Default: False
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
A string value which is the text that will be displayed to the user when they activate the context menu.
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.