ArrayGrid property array


This array indicates string values determines the look and other functional characteristics for every grid column.


   Sintax

ArrayGrid = [["titolo","campoDato","tipoDatoLink","larghezza",
"
titoloBgColor","bgColor","tooltip","colAlign",
"
fontColor","fontStyle","mrFontColor","mrFontStyle","headerFontColor","img_width","img_height"],[...]...]



   Possible values

title String with the name visualized on the column header.
dataField String which indicate what field joins to the grid column for its visualization.
dataTypeLink One or two characters string with the first, required, which indicate the type of data for the column:
"N" = Number
"S" = String
"B" = Boolean
"D" = Date
"I" = Image
If an "L" char follow the first char (es. "IL", image-link), the grid body for the column is a link associated to the function OnClickSpan, passed as an argument (optional) to ErgoDataGrid.
width String with a number that indicate column width, followed by "px" ("NUMpx") if is a pixel value or by "%" ("NUM%") if is a percentage.
titleBgColor   String with the column header background color. Use the value "Xpstyle" if you want an header with the Xp window header style.
bgColor String with the column body background color.
tooltip String which appears as a tooltip when the final user pass with the mouse over the column title.
colAlign Optional*. String which indicates the field allineament for the associated column in the table body; can be "RIGHT", "CENTER" o "LEFT".
fontColor Optional. String with the font color for the column data visualized in the table body.
fontStyle Optional. String that indicate the font style for the table body under the corresponding column.
mrFontColor Optional. String with the font color for the visualized data in the table body column corresponding to the clicked rows.
mrFontStyle Optional. String with the font style for the clicked rows.
headerFontColor Opzional. String with the headers font color.
img_width Opzional for the image fields. Stringa with the image width.
img_height Opzional for the image fields. String with the image height.

* optional values can be omitted cutting the array row at the last parameter which you ant to indicate, otherwise you can insert the value null corrisponding to the omitted parameters.


Example

This example indicate how to declare a grid object; first code rows are the declarations of the arrays which can be chosen to set ArrayGrid property on the basis of the language discovered by the browser or different selected by the final user (you can see how to change ErgoDataGrid visualization and various grid operations language).

var itArrayGridCars=[["Foto","img_url","IL","100px","#FF6600","White","Ordina per la foto","CENTER",null,null,null,null,null,"100","75"],
                     ["ID","id","N","30px","#FF6600","White","Ordina per l\\\' ID","RIGHT"],
                     ["Modello","description","S","180px","#FF6600","White","Ordina per il modello"],
                     ["Cilindrata cc","displacement","S","70px","#FF6600","White","Ordina per la cilindrata","CENTER"],
                     ["Immatricolazione","registration_string","S","140px","#FF6600","White","Ordina per la data di immatricolazione","RIGHT"],
                     ["Km","km_string","S","90px","#FF6600","White","Ordina per i km percorsi","CENTER"],
                     ["Potenza KW","power","N","80px","#FF6600","White","Ordina per la potenza in cavalli","CENTER"],
                     ["Alimentazione","fuel","S","120px","#FF6600","White","Ordina per il tipo di alimentazione","CENTER"],
                     ["Prezzo","price_string","S","70px","#FF6600","White","Ordina per il prezzo","RIGHT"]];
var enArrayGridCars=CopyArray(itArrayGridCars);
enArrayGridCars[0][0]="Photo";
enArrayGridCars[0][6]="Order by photo";
enArrayGridCars[1][6]="Order by ID";
enArrayGridCars[2][0]="Model";
enArrayGridCars[2][6]="Order by model";
enArrayGridCars[3][0]="Displacement cc";
enArrayGridCars[3][6]="Order by displacement";
enArrayGridCars[4][0]="Registration";
enArrayGridCars[4][6]="Order by registration date";
enArrayGridCars[5][0]="Miles";
enArrayGridCars[5][6]="Order by covered km";
enArrayGridCars[6][0]="Power KW";
enArrayGridCars[6][6]="Order by cc. power";
enArrayGridCars[7][0]="Fuel";
enArrayGridCars[7][6]="Order by the kind of fuel";
enArrayGridCars[8][0]="Price";
enArrayGridCars[8][6]="Order by price";

function Cars_init() {
	params=new Object();
	...
	params.ArrayGrid=eval(GetLang()+"ArrayGridCars");
	...
	Cars=new Grid(params);
}
...
Cars_init();