Add a column at the first or last position in the colModel and sets a certain properties to it

Parameters:

  • array $aproperties: data representing the column properties - including name, label...
  • string $position: can be first or last - defaulr is first

API Tags:
Access: public


JavaScript code for execution of valid grid method. This code is putted after the creation of the grid.

Parameters:

  • string $grid: valid grid id should be putted as #mygrid
  • string $method: valid grid method
  • array $aoptions: contain the parameters passed to the method. Omit this parameter if the method does not have parameters

API Tags:
Access: public

Return array of the generated colModel. Should be called after setColModel

API Tags:
Access: public

Return a jqGrid option specified by the key, false if the option can not be found.
Parameters:
string $key: the name of the grid option

API Tags:
Access: public


Main method which do allmost everthing for the grid. Construct the grid, perform CRUD operations, perform Query and serch operations, export to excel, set a jqGrid method, and javascript code

Parameters:

  • string $tblelement: the id of the table element to costrict the grid
  • string $pager: the id for the pager element
  • boolean $script: if set to true add a script tag before constructin the grid.
  • array $summary: - set which columns should be sumarized in order to be displayed to the grid
  • array $params: parameters passed to the query
  • boolean $createtbl: if set to true the table element is created automatically from this method. Default is false
  • boolean $createpg: if set to true the pager element is created automatically from this script. Default false.
  • boolean $echo: if set to false the function return the string representing the grid

API Tags:
Access: public

Construct the column model of the grid. The model can be passed as array or constructed from the SQL Query . The method try to determine the primary key and if it is found set as key:true to the appropriate field. If the primary key can not be determined set the first field as key:true in the colModel. Return true on success.
Parameters:

  • array $model: if set construct the model ignoring the SQL command
  • array $params: parametters passed to the SQL query
  • array $labels: if this parameter is set the method set the labels in colModel. The array should be associative which key value correspond to the name of colModel

API Tags:
Access: public

Set a new property in the constructed colModel. Return true on success. Should be called after setColModel method.
Parameters:

  • mixed $colname: valid coulmn name or index in colModel
  • array $aproperties: the key name properties.

API Tags:
Access: public

Set options for the toolbar filter when enabled with $toolbarfilter
Parameters:

  • array $aoptions: valid options for the filterToolbar

API Tags:
Access: public

Set a valid grid event
Parameters:

  • string $event: - valid grid event
  • string $code: Javascript code which will be executed when the event raises

API Tags:
Access: public


Set a grid options. The method uses array with keys correspondingto the jqGrid options as described in jqGrid docs

Parameters:

  • array $aoptions: A key name pair. Some options can be array to.

API Tags:
Access: public


Put a javascript code after all things are created. The method is executed only once when the grid is created.
Parameters:
  • string $code: - javascript to be executed

API Tags:
Access: public

Set a event in the navigator or in the diffrent modules add,edit,del,view, search
Parameters:

  • string $module: - can be navigator, add, edit, del, view, search
  • string $event: - valid event for the particular module
  • string $code: - javascript code to be executed when the event occur

API Tags:
Access: public

Set options in the navigator or in diffrent diffrent modules add,edit,del,view, search
Parameters:

  • string $module: - can be navigator, add, edit, del, view, search
  • array $aoptions: options that are applicable to this module The key correspond to the options in jqGrid

API Tags:
Access: public

Construct the html select used in the grid. The select element can be used in the editing modules, in formatter or in search module. The purpose of this method is to link other tables to desired filed.

Parameters:

  • string $colname: (requiered) valid colname in colModel
  • mixed $data: can be array (with pair key value) or string which is the SQL command which is executed to obtain the values. The command should contain a minimun two fields. The first is the key and the second is the value whch will be displayed in the select
  • boolean $formatter: deternines that the select should be used in the formatter of type select. Default is true
  • boolean $editing: determines if the select should be used in editing modules. Deafult is true
  • boolean $seraching: determines if the select should be present in the search module. Deafult is true.
  • array $defvals: Set the default value if none is selected. Typically this is usefull in serch modules. Can be something like arrary(""=>"All"); Note that this is puted only in the serch modules, but not in the editing one

API Tags:
Access: public

Prepares a executuion of a simple subgrid Return false if no subnames options are set
Parameters:

  • string $suburl: Url from where to get the data
  • array $subnames: Required - the names that should correspond to fields of the data
  • array $subwidth: (optional) - sets a width of the subgrid columns. Default 100
  • array $subalign: (optional) - set the aligmend of the columns. default center
  • array $subparams: (optional) additional parameters that can be passed when the subgrid plus icon is clicked. The names should be present in colModel in order to pass the values

API Tags:
Access: public

Prepares a subgrid in the grid expecting any valid html content provieded via the $suggridurl

Parameters:

  • string $suggridurl: url from where to get html content

API Tags:
Access: public

Set a url for editing and the grid url from where to obtain the data.

Parameters:

  • string $newurl: the new url

API Tags:
Access: public