Attributes
Name |
Required |
Default |
Evaluated |
Type |
Description |
| accesskey |
false |
|
false |
String |
Set the html accesskey attribute on rendered html element |
| align |
false |
|
false |
String |
Defines the alignment of the cell in the Body layer, not in header cell. Possible values: left, center, right., Default 'left'} |
| cssClass |
false |
|
false |
String |
The css class to use for element |
| cssErrorClass |
false |
|
false |
String |
The css error class to use for element |
| cssErrorStyle |
false |
|
false |
String |
The css error style definitions for element to use |
| cssStyle |
false |
|
false |
String |
The css style definitions for element to use |
| dataType |
false |
|
false |
String |
Type of the result. e.g. html, xml, text, json, ... |
| defval |
false |
|
false |
String |
The default value for the search field. This option is used only in Custom Searching and will be set as initial search. |
| disabled |
false |
|
false |
String |
Set the html disabled attribute on rendered html element |
| editable |
false |
false |
false |
Boolean |
Defines if the field is editable. |
| editoptions |
false |
|
false |
String |
Array of allowed options (attributes) for edittype option |
| editrules |
false |
|
false |
String |
sets additional rules for the editable field. e.g {number:true, required: true, minValue:10, maxValue:100} |
| edittype |
false |
|
false |
String |
Defines the edit type for inline and form editing Possible values: text, textarea, select, checkbox, password, button, image and file. |
| effect |
false |
none |
false |
String |
Perform a effect on the elements specified in the 'targets' attribute. e.g. bounce, highlight, pulsate, shake, size or transfer. See more details at http://docs.jquery.com/UI/Effects |
| effectDuration |
false |
2000 |
false |
String |
Duration of effect in milliseconds. Only valid if 'effect' attribute is set |
| effectMode |
false |
none |
false |
String |
The Effect Mode. show, hide, toggle, none |
| effectOptions |
false |
|
false |
String |
jQuery options for effect, eg 'color : #aaaaaa' for the highlight effect or 'times : 3' for the bounce effect. Only valid if 'effect' attribute is set. See more details at http://docs.jquery.com/UI/Effects |
| errorElementId |
false |
false |
false |
String |
This should provide the id of the element into which the error text will be placed when an error ocurrs loading the container. If 'errorTest' is provided, that wil be used, otherwise the ajax error message text wil be used. |
| errorText |
false |
false |
false |
String |
The text to be displayed on load error. If 'errorElement' is provided, this will display the error in the elemtn (if existing), if not, it will display the error as the contents of this container |
| fixed |
false |
false |
false |
Boolean |
If set to true this option does not allow recalculation of the width of the column if shrinkToFit option is set to true. Also the width does not change if a setGridWidth method is used to change the grid width. |
| formIds |
false |
|
false |
String |
Comma delimited list of form ids for which to serialize all fields during submission when this element is clicked (if multiple forms have overlapping element names, it is indeterminate which will be used) |
| formatoptions |
false |
|
false |
String |
Format options can be defined for particular columns, overwriting the defaults from the language file. |
| formatter |
false |
|
false |
String |
The predefined types (string) or custom function name that controls the format of this field. e.g.: integer, currency, date, checkbox |
| formoptions |
false |
|
false |
String |
Defines various options for form editing. e.g. { label:'My Label', elmprefix:'()', rowpos:1, colpos:2 } |
| frozen |
false |
false |
false |
Boolean |
If set to true determines that this column will be frozen. |
| hidden |
false |
false |
false |
Boolean |
Defines if this column is hidden at initialization. |
| hidedlg |
false |
false |
false |
Boolean |
If set to true this column will not appear in the modal dialog where users can choose which columns to show or hide. |
| href |
false |
|
false |
String |
The url to be use when this element is clicked |
| id |
false |
|
false |
String |
HTML id attribute |
| index |
false |
|
false |
String |
Set the index name when sorting. Passed as sidx parameter. |
| indicator |
false |
|
false |
String |
If loading content into a target, Id of element that will be displayed during loading and hidden afterwards (will override settings for the target container) |
| javascriptTooltip |
false |
false |
false |
Boolean |
Use JavaScript to generate tooltips |
| jsonmap |
false |
|
false |
String |
Defines the json mapping for the column in the incoming json string. |
| key |
false |
false |
false |
Boolean |
In case if there is no id from server, this can be set as as id for the unique row id. Only one column can have this property. If there are more than one key the grid finds the first one and the second is ignored. |
| label |
false |
|
false |
String |
Label expression used for rendering an element specific label |
| labelSeparator |
false |
: |
false |
String |
String that will be appended to the label |
| labelposition |
false |
|
false |
String |
Define label position of form element (top/left) |
| listenTopics |
false |
|
false |
String |
The comma separated list 'listenTopics' is the list of topic names that is used to trigger a request. |
| loadingText |
false |
|
false |
String |
If loading content into a target, The text to be displayed during load (will be shown if any provided, will override settings for the target container) |
| name |
true |
|
false |
String |
Set the unique name in the grid for the column. This property is required. As well as other words used as property/event names, the reserved words (which cannot be used for names) include subgrid, cb and rn. |
| onAfterValidationTopics |
false |
|
false |
String |
A comma delimited list of topics that published after the Ajax validation. event.originalEvent.formvalidate to see if validation passed/failed. |
| onAlwaysTopics |
false |
|
false |
String |
A comma delimited list of topics that published always |
| onBeforeTopics |
false |
|
false |
String |
Topics that are published before a load |
| onBlurTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element is blured |
| onChangeTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element changed |
| onCompleteTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element ajax request is completed (will override settings for a target container if provided) |
| onDisableTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element disabled |
| onEffectCompleteTopics |
false |
|
false |
String |
A comma delimited list of topics that published when an effect is completed |
| onEnableTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element is enabled |
| onErrorTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element ajax request returns an error (will override settings for a target container if provided) |
| onFocusTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element is focused |
| onSuccessTopics |
false |
|
false |
String |
A comma delimited list of topics that published when the element ajax request is completed successfully (will override settings for a target container if provided) |
| onblur |
false |
|
false |
String |
Set the html onblur attribute on rendered html element |
| onchange |
false |
|
false |
String |
Set the html onchange attribute on rendered html element |
| onclick |
false |
|
false |
String |
Set the html onclick attribute on rendered html element |
| ondblclick |
false |
|
false |
String |
Set the html ondblclick attribute on rendered html element |
| onfocus |
false |
|
false |
String |
Set the html onfocus attribute on rendered html element |
| onkeydown |
false |
|
false |
String |
Set the html onkeydown attribute on rendered html element |
| onkeypress |
false |
|
false |
String |
Set the html onkeypress attribute on rendered html element |
| onkeyup |
false |
|
false |
String |
Set the html onkeyup attribute on rendered html element |
| onmousedown |
false |
|
false |
String |
Set the html onmousedown attribute on rendered html element |
| onmousemove |
false |
|
false |
String |
Set the html onmousemove attribute on rendered html element |
| onmouseout |
false |
|
false |
String |
Set the html onmouseout attribute on rendered html element |
| onmouseover |
false |
|
false |
String |
Set the html onmouseover attribute on rendered html element |
| onmouseup |
false |
|
false |
String |
Set the html onmouseup attribute on rendered html element |
| onselect |
false |
|
false |
String |
Set the html onselect attribute on rendered html element |
| openTemplate |
false |
|
false |
String |
Set template to use for opening the rendered html. |
| requestType |
false |
POST |
false |
String |
Type of the AJAX Request. POST, GET, PUT |
| required |
false |
false |
false |
Boolean |
If set to true, the rendered element will indicate that input is required |
| requiredposition |
false |
|
false |
String |
Define required position of required form element (left|right) |
| resizable |
false |
true |
false |
Boolean |
Defines if the column can be re sized |
| search |
false |
true |
false |
Boolean |
When used in search modules, disables or enables searching on that column. |
| searchoptions |
false |
|
false |
String |
Defines the search options used searching. e.g. {sopt:['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc']} |
| searchtype |
false |
|
false |
String |
Determines the search type of the field. Can be text - also a input element with type text is created and select - a select element is created. |
| sortable |
false |
true |
false |
Boolean |
Defines is this can be sorted. |
| sorttype |
false |
text |
false |
String |
Used when datatype is local. Defines the type of the column for appropriate sorting.Possible values: int/integer - for sorting integer, float/number/currency - for sorting decimal numbers, date - for sorting date, text - for text sorting, function - defines a custom function for sorting. |
| surl |
false |
|
false |
String |
Valid only in Custom Searching and edittype : 'select' and describes the url from where we can get already-constructed select element |
| tabindex |
false |
|
false |
String |
Set the html tabindex attribute on rendered html element |
| targets |
false |
|
false |
String |
A comma separated list of ids of container elements to load with the contents from the result of this request |
| template |
false |
|
false |
String |
The template (other than default) to use for rendering the element |
| templateDir |
false |
|
false |
String |
The template directory. |
| timeout |
false |
3000 |
false |
Integer |
jQuery options for timeout. Default is 3000 |
| title |
false |
|
false |
String |
Column title |
| tooltip |
false |
|
false |
String |
Set the tooltip of this particular component |
| tooltipConfig |
false |
|
false |
String |
Deprecated. Use individual tooltip configuration attributes instead. |
| tooltipCssClass |
false |
StrutsTTClassic |
false |
String |
CSS class applied to JavaScrip tooltips |
| tooltipDelay |
false |
Classic |
false |
String |
Delay in milliseconds, before showing JavaScript tooltips |
| tooltipIconPath |
false |
|
false |
String |
Icon path used for image that will have the tooltip |
| value |
false |
|
false |
String |
Preset the value of input element. |
| width |
false |
|
false |
String |
Set the initial width of the column, in pixels. |
|
how can I show an column in edit modal dialog and hide it in a grid
how to add scroll bar to grid column?
Hi ,
I have a question...my sjg:column has to be edited and my edittype="select" and i have to pass the listkey and values from my arraylist or some collection.....is it possible to add the values dynamically like...... editoptions="{value:'%{key}:%{value}'}"/>...please help how to do this...... Thanks Babu
Where would I look to find more information on what can be done in the formoptions?
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs
Hello,
there is something I should have missed because I can't put HTML in a column without having it escaped.
I tried setting dataType to html with no succes.
Is there a way to make it work?
FYI disable html escaping is made by setting autoencode="false" at grid level.
I want to have a field addable but not editable. For example, registering a user, the username must be addable in the "add window" but not editable after the creation.
How can I do this? In the add form it shows only the editable fields..
Collection.size is not working for the name attribute of the gridColumn. Suppose there is a Role class and a User class, and the Role class has a Set<User> users property. The jsp is: <sjg:grid gridModel="roles">
</sjg:grid> Nothing displays!Please use the User Group for Questions: http://groups.google.com/group/struts2-jquery
add a getter in your Role Class.
public int getUsersSize(){
}<sjg:gridColumn name="usersSize"/>
use hidden="true" and editrules="{edithidden:true}" if you want to hide a field from the grid but show it in the add/edit form.
Hi, i have problem, i want a gird column to show images.
My code is :
<sjg:gridColumn name="urlImage" index="urlImage" title="Images"
But it show as text...
Plz help me, i'm newbie
I am currently having some issue with CSS. I am not able to get the required style as show in samples. Please any one with suggestion.... I used struts2-jquery-grid-plugin-3.0.2.jar/struts2-json-plugin-2.2.3.jar/struts2-jquery-plugin-3.0.2.jar in my classpath
CSS problem with grid
Why the href attribute does not make me see the link on the gridcolumn?
why the attibute of "template" no work?
I cant make the href attribute work... where is this link supposed to be shown? I want to put a link on each row, so when the user clicks it, a new page opens with detailed info and another advanced options.
How can I validate the input wehen I want to insert into database?
Hi,
Please help me.<sjg:gridColumn id="gridbirthdate" name="birthdate" />
the name value is used as the id value also and not replaced by the value set.
Any way around this
in grid how to get sum of columns values .........!!