Rico
May contain the text of an error message that occurred outside this control prior to rendering
Database connection object. Required only if sqlText is used.
Optional sql query to execute, must return 5 columns matching WriteTreeRow parameters
Adds an entry that will be returned with the results. Often used to add the root node.
id of parent, "" if this is the root
id that uniquely identifies this node in the tree
description displayed to the user
"L" or 0 = leaf, "C" or non-zero = container
0=not selectable, 1=selectable
Use this class on a page that responds to AJAX requests from a Rico Tree Control
This class automatically disables caching of the response and sets the response type to text/xml
Represents a column in the select statement
True if the select statement contains the DISTINCT keyword
List of columns in the select statement
List of "group by" items in the select statement
List of "order by" items in the select statement
From clause of the select statement, including any joins
Where clause of the select statement
Having clause of the select statement
List of column headings in the select list.
Set after an any unparse* call.
Returns a cloned copy of this object
Builds a SQL select statement string from its parsed components
Rebuilds a SQL select statement that was parsed by ParseSelect, inserting the DISTINCT keyword
Returns a SQL select statement that will return all of the values in a particular column.
This version is meant MS Access, as it does not support ordering by column name
Returns a SQL select statement that will return all of the values in a particular column.
The returned statement is not compatible MS Access, use UnparseDistinctColumnAccess() instead.
Returns the select list part of the statement as a string
Returns a "windowed" select query.
The first row number to be returned
The number of rows to return
use true for SQL Server 2005+ and false for Oracle
Resets the object and prepares it to parse another select statement.
Loads a select statement into the object.
Does not handle:
- union queries *
- select into
- select top
- more than one space between "group" and "by", or "order" and "by"
- stored procedures
* Put union queries in a view and then write your select statement against the view.
Holds a SQL select statement. Methods to load/parse a select statement from a string and to reassemble it in various ways.
Does not handle union queries.
Initial width of the column in pixels. Default is to use SimpleGrid.defaultWidth.
Defines a column in a SimpleGrid
Is the user allowed to sort the column? Default is true.
Is the user allowed to drag a column value? Default is false.
Is the user allowed to filter the column? Default is true.
Javascript code to create a control object, which changes the way the column data is rendered.
The disadvantage of using this approach is that the altered rendering does not get reflected in exports.
A set of controls is defined in ricoLiveGridControls.js or the developer can create their own.
If the AutoFilter option is enabled for the grid, then filterUI will control how each column is filtered. If filterUI is:
- null or omitted, then no filter is displayed for the column.
- 't' - will generate a text box filter and the records being displayed are filtered as the user types. May be followed by a number to indicate the size of the text box (default size is 10).
- 's' - will generate a select list filter with all possible column values contained in the list. Populated using a 'select distinct' query if the grid's source is a SQL query.
- 'm' - will generate multi-select checklist filter, with a checkbox next to each item.
This setting allows the filterUI to filter a different column than where it is displayed.
This is particularly useful for dates, where you can show a year selection on an OrderDate date column for example,
but actually have it filter a hidden column OrderYear=year(OrderDate).
The text content of this column will be included in delete confirmation messages.
If column is a number, this value can be used to multiply the database value by a factor before displaying it in the grid.
Default is 1. Automatically set to 100 if DataType is percent.
If column is a number, this is the number of digits displayed to the right of the decimal point. Default is 0.
If DataType is dollar or euro, then decPlaces is automatically set to 2.
If column is a number, display the value with a thousands separator? Default is true.
Specifies how negative numbers should be displayed. Possible values:
- L=leading minus (default)
- T=trailing minus
- P=parentheses
If column is a number, this string is prepended to the number before display.
Useful for currency symbols.
If column is a number, this string is appended to the number before display.
Useful for percentages and temperature values. Automatically set to % if DataType is percent.
Used to give the column heading a specific style.
In most cases this is not necessary, as the heading will be styled according to the theme.
Database property - set automatically by LiveGrid.GetColumnInfoFromDb()
Database property - set automatically by LiveGrid.GetColumnInfoFromDb()
Database property - set automatically by LiveGrid.GetColumnInfoFromDb()
Database property - set automatically by LiveGrid.GetColumnInfoFromDb()
Database property - set automatically by LiveGrid.GetColumnInfoFromDb()
For internal use
Text displayed in the column heading.
Initial width of the column in pixels. Default is to use LiveGrid.defaultWidth.
Returns an Excel-type number format string based on decPlaces, thouSep, prefix.
Type of data stored in the column.
Internal function that returns the LiveGrid column options object, used to initialize the column on the client.
Base class for a LiveGrid column
SQL expression
Calculated Column
Column name in table or view
This should match the TblAlias of one of the Table objects specified for the grid.
If unspecified, the primary table or view is assumed.
Used internally
Column from table or view
Regular expression used to validate the user input. User entries will be checked to ensure they match the pattern specified.
There are a few special values:
- emailtests for a valid email address
- float-unsignedtests for a valid unsigned floating point (real) number
- float-signedtests for a valid signed floating point (real) number (this is the default when EntryType is "F")
- int-unsignedtests for a valid unsigned integer number
- int-signedtests for a valid signed integer number (this is the default when EntryType is "I")
Sets the minimum allowable value in a numeric or date field.
For dates, the value should be in ISO-8601 format.
Sets the maximum allowable value in a numeric or date field.
For dates, the value should be in ISO-8601 format.
Provides information to help the user understand the meaning of the field.
Fields with help text will be display with a blue "i" icon next to the field name.
When the user hovers their cursor over the icon, the help text will be displayed.
For columns with entry type "TA", this is # of rows to display in the textarea when in form view (default 4)
For columns with entry type "TA", this is # of columns to display in the textarea when in form view (default 80)
column's default value in the form view
Specifies the SQL select statement to use for EntryTypes of SL, CL, and RL.
The select statement should return 2 columns: the first being the code and the second being the text value/description.
For example:
EntryType="SL" ColName="CustID" SelectSql="select ID,Name from Customers"
For entry type "CL", this property specifies the id of the custom control.
SelectSql serves 2 purposes. First, it is used to retrieve the appropriate data to display in the grid.
Second, it is used to populate the values in the select box (SL) or radio buttons (RL) on the pop-up form.
In some cases, you may want these to be different. In the SelectSql example above, we are retrieving customer name.
But let's say that our Customers table has a "CreditHold" field and we want to disable the selection of customers
on credit hold in the form view, but still display them in the grid.
This is where SelectFilter comes in:
SelectFilter="CreditHold='NO'"
Specifies the choices the user sees in form view for EntryTypes of N, S, and R.
If supplied, then this should be a string of comma-separated values.
For example:
SelectValues="Y,N"
Specifies the number of rows to display in drop down select boxes for entry types S and SL.
Default is to let the browser decide.
If true, then the grid is filtered by the default value (ColData) for this column (default=false)
If true, then only write this field to the database when peforming an insert (default=false).
If true, then only write this field to the database when peforming an update (default=false).
If true, data is displayed on the entry form but cannot be changed, text is gray (default=false).
Does not apply to entry types of S, SL, N, R, RL -- use FormView="hidden" instead.
- TrueItem is shown on the entry form (default)
- FalseItem is not shown on the form
When false, the column value will be left unquoted when inserting or updating the database.
Default is false for entry type TS, and true for all other entry types.
This makes it possible to populate columns with SQL function calls.
For example:
ColName="LastEditUser" EntryType="H" AddQuotes="false" ColData="suser_sname()"
If true, the user is allowed to select multiple values.
For entry types R and RL, this changes the input from radio buttons to checkboxes.
Default is false.
Normally RL and SL columns are used for foreign keys, and only the key is stored in the table, not the foreign key's associated
name or description. However, by specifying a value for DescriptionCol, you can store the associated description as well.
EntryType="SL" ColName="CustID" DescriptionCol="CustName" SelectSql="select ID,Name from Customers"
Used internally. Populates automatically based on DescriptionCol.
Boolean value that when true, specifies that this entry field should placed on the same form row as the last field
(default: false - each form field is placed on a separate row).
Returns true if the column is a lookup field (entry type SL, RL, or CL)
Code indicating the ui to be used for data entry
- TAText Area
- RRadio button list
- RLRadio buttons via lookup (field is a foreign key)
- SSelect list
- SLSelect list via lookup (field is a foreign key)
- CLCustom widget via lookup (field is a foreign key)
- NSelect list of distinct column values, use allowed to add new values
- BText, non-blank
- TText
- IInteger
- FFloating point number
- tinyMCERich text via tinyMCE
- DDate
- TSTime stamp
- HHidden
Defines an editable column in a LiveGridEdit object
Database connection object (used when data source is a SQL query)
Controls whether columns can be sorted (default: true).
Sorting can be disabled for individual columns using the canSort property.
Controls whether columns can be hidden/shown (default: true).
Hide/show can be disabled for individual columns using the canHide property.
Controls whether columns can be filtered (default: true).
Filtering can be disabled for individual columns using the canFilter property.
A string that specifies what gets highlighted/selected in the grid
- cursorRowthe grid row under the cursor
- cursorCellthe grid cell under the cursor
- menuRowthe grid row where the menu is displayed (default)
- menuCellthe grid cell where the menu is displayed
- selectionallow the user to select cells
- nonenever highlight
Method used to highlight cells and rows.
- outlineleast CPU-intensive on client-side
- classadds CSS class to highlighted cell/row (default)
- bothhighlight using both outline and class
Load the buffer (and therefore the grid) on page load? (default: true)
Display the session timer above the grid? (default: true)
Display the grid bookmark, ie. "Listing records X - Y of Z" (default: true)
A caption for the grid, displayed next to the bookmark (default: nothing)
Javascript event handler called when the user left-clicks on a cell
Javascript event handler called when the user double-clicks on a cell
Javascript event handler called when the user right-clicks on a cell
A Javascript function to be called right before the grid is initialized.
A Javascript function to be called right after the grid is initialized.
For SQL data sources, this specifies a SQL condition clause to always be used when running the SQL query.
Whenever the user adjusts a column width, should the new width be saved to the grid's cookie? (default: true)
Whenever the user filters a column, should the new filter be saved to the grid's cookie? (default: false)
Whenever the user sorts a column, should the new sort be saved to the grid's cookie? (default: false)
Number of days before the grid's cookie expires. If you don't specify a value,
then the cookie is only maintained for the current session.
For SQL data sources, this specifies the default way the data should be sorted. (default: use primary key)
The maximum number of rows that the user is allowed to Print/Export. Set to 0 to disable print/export.
Default is to use the Rico client value (currently 5000).
Specifies which drag-and-drop management zone should be used for drag operations (default: 0).
This only needs to be specified if the web page uses multiple distinct zones.
For SQL data sources, should the parsed query be stored in a session variable? This improves performance. (default: true)
Minimum # of visible rows. Used only when visibleRows < 0. (default: 2)
Maximum # of visible rows. Used only when visibleRows < 0. (default: 50)
Set to 'true' for ColumnGroup labels to be used as secondary headings.
In LiveGrid Edit, it may be set to 'false' so that ColumnGroup labels are only used on the input form.
Default: true.
Send details of sql parsing/execution in ajax response? (true/false)
Default is to follow the debug value in web.config
Include sql statement in results if an error occurs (true/false)
Default is to follow the debug value in web.config
Format of data returned by AJAX calls, either "xml" or "json" (defaul: xml).
This property influences the size of the client buffer and AJAX fetch size.
Default value is -1, which means use the Rico client default value.
Optional parameters to be passed along during the AJAX call
Name of the Javascript variable containing the LiveGrid Edit object
Name of the Javascript variable containing the LiveGrid buffer object
Name of the Javascript variable containing the initial LiveGrid buffer options
Provides a set of functions that mask differences across various SQL dialects. Available once dbDialect is set.
When connecting to SQL databases, this is the SQL dialect to use.
When using a SQL data source there is no need to set this property,
as AJAX data fetches are sent back to the originating script by default.
When setting this property to a URL, make sure the URL is enclosed in single quotes.
Number of visible rows in the grid.
Negative values have the following meanings:
- -1: size grid to client window
- -2: size grid to whichever is smaller: the client window or the data
- -3: size grid so that the page body does not have a scrollbar (default)
- -4: size grid to its parent node in the DOM
Collection of ColumnGroup objects, which define the headings used above each group of columns.
Defines the tables used by the LiveGrid. The first table is primary/main table.
Returns the class name of the specified grid column
Adds a new column to grid, returns column index
Takes a given string and makes it JSON valid (http://json.org/)
value which should be escaped
JSON valid string
AUTHOR: Michael Rebec
All characters which needs to be escaped are beeing replaced by their
unicode representation according to the
RFC4627#2.5 - http://www.ietf.org/rfc/rfc4627.txt?number=4627
Methods and properties common to LiveGrid and LiveGridEdit
The type of buffer deployed on the client
- AjaxSQLdata source is a SQL database query
- AjaxLoadOncedata is loaded all at one time from a remote source, such as an XML or JSON file
- Basedata is static, loaded from either an html table or javascript array
If grid is populated from an html table, then set HtmlSourceId to the id of the source table
True if this should be a distinct sql query (default is false)
Class to define a LiveGrid
A LiveGrid buffers its data in a Javascript array and can retrieve that data via AJAX
Returns the index of the table with TblAlias or -1 if not found
Name of grid Javascript object
Name of grid options Javascript object
If enabled, an additional row is added to the grid header where column filters are placed.
See the EditCol.filterUI property to customize each column's filter.
The token in select filters used to indicate "show all values" (default: "___ALL___").
if -1 (default), then use column heading width, otherwise this is the default width in pixels
Allow user to resize columns? Default is true.
Number of frozen columns on the left (or right if direction=rtl). Default is 0.
Height of one line of text in ems. Default is 1.2, which should be fine for almost all situations.
Resize grid when browser window is resized? Default is true.
Specifies when the grid's popup menu should be invoked
Style used for the entire grid - headings and data.
This holds the default style for headings. Use only if not using themes.
Collection of styles used for individual headings.
Lines of text displayed in each heading row
Lines of text displayed in each data row
Returns the id of the outermost grid container
Returns the index of the column with the given id
Returns the column object with the given id
Returns the set of css rules that apply to this grid
This class defines properties and functions used in SimpleGrid, LiveGrid and LiveGridEdit classes.
True if the text should be displayed using a bold font
True if the text should be displayed in italics
True if the text should be underlined
Font size in points
If true, then style is only applied to the grid, not to html or Excel exports
Specifies the background color. One of the 16 standard color names, or #rrggbb.
Specifies the font color. One of the 16 standard color names, or #rrggbb.
Specifies horizontal alignment: Left, Right, Center, or NotSet (default)
Normally, overflowed content is hidden, but this allows content in the cell to scroll.
Only applies to the grid, not to exports.
Used internally. Returns the style properties as a css string.
Used internally. Returns the style properties as an Excel XML string without the style tag.
Base class for all style classes as well as the Column class.
StyleID's should not contain spaces or other special characters.
- Use a StyleID of Default to style the entire grid
- Use a StyleID of DefaultHdg to style the grid heading
- Use a StyleID of ricoLG_evenRow and/or ricoLG_oddRow to stripe the grid (striping does not get exported).
- Use a StyleID of ricoLG_selection to set the styling for the selected row.
Returns the style properties as a CSS rule
Returns the style properties as an Excel XML style, including the style tag
For SimpleGrids only
For SimpleGrids only
Returns the style properties plus number format as an Excel XML style, including the style tag
Defines a style that can be applied to a grid cell.
Using a StyleID of ricoLG_evenRow or ricoLG_oddRow will stripe the grid, however striping does not get exported.
Using a StyleID of ricoLG_selection will set the styling for the selected row.
Adds a Style object to the collection
Returns a Style object from the collection based on the style's StyleID
Returns all of the StyleID's in the collection
Returns all of the Style objects in the collection
Returns true if the StyleID is in the collection
Removes the Style object with the given StyleID from the collection
Container for a collection of Style objects
Background image for grid headings and window titles.
Should be left unset, as it is used only for the grayedout theme (in which case it is set automatically).
The base Javascript library to load from http://ajax.googleapis.com/ajax/libs/, possible values include:
- prototype/1.6/prototype.js
- prototype/1.7/prototype.js
- jquery/1.3/jquery.min.js
- jquery/1.4/jquery.min.js
- jquery/1.5/jquery.min.js
- jquery/1.6/jquery.min.js
- mootools/1.2/mootools-yui-compressed.js
- mootools/1.3/mootools-yui-compressed.js
- dojo/1.5/dojo/dojo.xd.js
- dojo/1.6/dojo/dojo.xd.js
- ext-core/3.0/ext-core.js
- ext-core/3.1/ext-core.js
Default value is "proto_min", which loads prototype 1.7 from the server control.
Enable Javascript console logging? Useful for debugging. Default is false.
Enable HTML5 web form elements in browsers that support them.
Default is false because the quality of the HTML5 web form elements is uneven across browsers.
Best left unset, in which case language will be set automatically based on request's HTTP_ACCEPT_LANGUAGE
However, if you want to present the same locale settings to all users, then you can set this value to force the desired locale.
Load base Javascript library (prototype, jQuery, etc)?
Default is true.
Set to false if library is being loaded another way. In this case, a BaseLib value is still required to indicate
which library Rico should connect to.
Apply row striping to LiveGrids? Default is true. Applies only when themes are used.
Comma separated list of 2 letter locales that Rico supports.
Do not set unless you have developed your own locale file.
URL to load jQuery themes from.
Default is http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/
Override this value if you have a jQuery theme on your own server.
Returns the 2 character string representing the Rico locale file that was actually used on the client.
If there is no match between the requested languages and the available locale files, then english is used.
Only available during the render phase.
Load settings from QueryString? true for demo, false for anything else. Default is false.
Load settings from web.config file? Default is false.
If true, then the appSettings section of web.config will be checked for the following keys (which affect the similarly named properties):
- rico_BaseLib
- rico_Language
- rico_jTheme
- rico_rTheme
- rico_Logging
- rico_HTML5
- rico_LoadBaseLib
- rico_Striping
Boolean values in web.config should be the strings "true" or "1" for true, and "false" or "0" for false.
Initialize all grids on the page
Initialize grids with fixed # of rows first,
then initialize grids with variable # of rows
Set theme to one of the jQuery Themeroller themes. Default is no theme.
Valid values are:
black-tie, blitzer, cupertino, dark-hive, dot-luv, eggplant, excite-bike, flick,
hot-sneaks, humanity, le-frog, mint-choc, overcast, pepper-grinder, redmond, smoothness,
south-street, start, sunny, swanky-purse, trontastic, ui-darkness, ui-lightness, vader
Set theme to one of the Rico themes. Default is no theme.
Valid values are:
coffee-with-milk, grayedout, greenHdg, seaglass, warmfall
Loads the various Javascript, CSS, and image files required to make Rico function.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
A strongly-typed resource class, for looking up localized strings, etc.
Class to define a SimpleGrid
Javascript function to be called when the form opens to add or edit a record
Javascript function to be called when the add/edit form closes
Javascript function to be called when the add/edit form is submitted to the server
Javascript function to be called when a response is received from the server after a form submittal
Event raised right before the database deletion takes place.
Index into the Tables collection. 0 is the main table.
Event raised right before the database insertion takes place.
Index into the Tables collection. 0 is the main table.
Hashtable containing the data to be inserted. Key is the column name. Value is the quoted data to be written. Changing the contents of the hash does NOT change what is written to the database.
Event raised right before the database update takes place.
Index into the Tables collection. 0 is the main table.
Hashtable containing the data to be updated. Key is the column name. Value is the quoted data to be written. Changing the contents of the hash does NOT change what is written to the database.
Where clause that selects the record to be updated.
Returns where clause based on table's primary key