Optional parameters for the DataGrid property
covered the $.fn.datagrid.defaults.
Name of parameter |
Type |
Describe |
Default value |
Title |
String |
Title of the DataGrid panel |
Null |
Iconcls |
String |
Displays the 16x16 icon through a CSS class on the panel. |
Null |
Border |
Boolean |
Sets whether the panel has a border |
TRUE |
Width |
Number |
Width of the DataGrid panel |
Auto |
Height |
Number |
Height of the DataGrid panel |
Auto |
Columns |
Array |
DataGrid Column Configuration Object |
Null |
FrozenColumns |
Array |
Frozen columns, being realistic on the left |
Null |
Striped |
Boolean |
Sets whether to let cells show stripes. False by default. |
FALSE |
Method |
String |
The remote data is requested by this method type. Default post. |
Post |
NoWrap |
Boolean |
If the data is wrapped, the package data is displayed in one row by default |
TRUE |
IDfield |
String |
Identify field, or primary key field |
Null |
Url |
String |
The URL of the request data. |
Null |
Loadmsg |
String |
Information to display when loading data |
Processing, please wait ... |
Pagination |
Boolean |
Whether to display the paging toolbar |
FALSE |
Rownumbers |
Boolean |
|
|
The DataGrid Columns is an array object, and the object in the array is an array, and each small object in the array is a column field, for example:Column Property
columns:[[
{field: ' Itemid ', title: ' Item ID ', rowspan:2,width:80,sortable:true},
{field: ' ProductID ', title: ' Product ID ', rowspan:2,width:80,sortable:true},
{title: ' Item Details ', Colspan:4}
],[
{field: ' ListPrice ', title: ' List price ', width:80,align: ' Right ', sortable:true},
{field: ' UnitCost ', title: ' Unit cost ', width:80,align: ' Right ', sortable:true},
{field: ' Attr1 ', title: ' Attribute ', width:100},
{field: ' Status ', title: ' Status ', width:60}
]]
name |
type |
Description |
default value |
title |
string |
the name of the column field to be realistic |
undefined |
field |
string |
column field |
undefined |
width |
number |
width |
undefined |
rowspan |
number |
cell rows |
undefined |
colspan |
number |
cell columns |
undefined |
align |
string |
text alignment, with the Align property. |
undefined |
sortable |
boolean |
can be sorted. |
undefined |
checkbox |
boolean |
have multiple boxes |
undefined |
|
Events (Event)
Name |
Parameters |
Description |
Onloadsuccess |
None |
Call Remote Data success is active |
Onloaderror |
None |
Activation when loading errors |
Onclickrow |
RowIndex, RowData |
Activate when one row is clicked, and the parameters include: RowIndex: Number of rows clicked, starting from 0 RowData: Data for the current row |
Ondblclickrow |
RowIndex, RowData |
Double-clicking a row is a trigger, and the parameters include: RowIndex: Number of rows clicked, starting from 0 RowData: Data for the current row |
Onsortcolumn |
Sort, order |
Activated when a column is sorted, parameters include: Sort: Sorted field name Order: Sort rules, ascending, descending |
OnSelect |
RowIndex, RowData |
Activated when a row is selected, parameters are: RowIndex: Number of rows selected RowData: Data |
Onunselect |
RowIndex, RowData |
Activate when unchecked, parameters: RowIndex: Number of rows selected RowData: Data |
|
Methods (method)
Name |
Parameter |
Description |
Options |
None |
Return all Properties |
Resize |
None |
Reset Size Layout |
Reload |
None |
Reload data |
Fixcolumnsize |
None |
Resize a column |
LoadData |
Param |
Data is loaded and the previous data is removed |
GetSelected |
None |
Returns the selected row, none returns an empty |
Getselections |
None |
Returns all rows, empty returns an empty array |
Clearselections |
None |
Cancels all selected |
SelectRow |
Index |
Select a row, the parameter is the line number |
Selectrecord |
Idvalue |
A record is queried based on the primary key |
Unselectrow |
Index |
Uncheck a row |
Easyui DataGrid uses the DataGrid property interpretation