Documentation

Installation

Properties

Methods

 

Download Documentation

Download english documentation (PDF)

 

Properties

You can modify the value of the parameters input boxes, see the generated code in the Example of use box and copy the code into your scripts.

ButtonWidth

Description:

Specifies the width of the icons used as buttons on phpMyDataGrid.

Allowed values:

ButtonWidth : Integer.
Default: 25

Example of use:

 Copy
«•   »
backtick

Description:

Some databases like MySQL allow to enclose the name of the fields, table names or database names, by using a special character, for example ` the character

Allowed values:

backtick : Character.
Default: `

Example of use:

 Copy
«•   »
liquidTable

Description:

Defines whether or not phpMyDataGrid will fit automatically the width available on the screen.

Allowed values:

liquidTable : Boolean.
Default: false

Example of use:

 Copy
«•   »
width

Description:

It complements the property liquidTable defining the percentage of which will fit the screen automatically.

Allowed values:

width : String, Defining a percentage.
Default: 100%

Example of use:

 Copy
«•   »
condition

Description:

It is now possible to condition the style of certain records giving them another output format, as easy as define the conditions that must be fulfilled.

Allowed values:

condition : String, conditional statement.

Example of use:

 Copy
Atention: It is possible to use any field used within the grid, simply type the field name between [' ... ']
NOTE: phpMyDataGrid evolution, allows to you to use this property in order to define a CSS style, as well as you can use the addRowStyle method which allows to define a set of conditions in order to get as result a CSS class to format the row output
«•   »
conditionalStyle

Description:

This property complements the use of condition property, in this property are defined the styles to display the records that meet the specified condition.

Allowed values:

conditionalStyle : CSS style list

Example of use:

 Copy
Atention: If you use the method addRowStyle to set conditions, it is not necessary to use this property
«•   »
conditionEdit

Description:

If you want to limit the editing records only those who meet certain conditions, use the following property to define the condition that must be fulfilled.

Allowed values:

conditionEdit : String, conditional statement.

Example of use:

 Copy
Atention: It is possible to use any field used within the grid, simply type the field name between [' ... ']
«•   »
conditionDelete

Description:

If you want to limit the deleting records only those who meet certain conditions, use the following property to define the condition that must be fulfilled.

Allowed values:

conditionDelete :

Example of use:

 Copy
Atention: It is possible to use any field used within the grid, simply type the field name between [' ... ']
«•   »
moneySign

Description:

Define the sign to display in Money field types

Allowed values:

moneySign : 1 character.
Default: $

Example of use:

 Copy
«•   »
zebraLines

Description:

Defenes the way in which the interlined will be displayed

Allowed values:

zebraLines : Integer
Default: 1

Example of use:

 Copy
«•   »
showToOf

Description:

This property defines if the message Displaying records X to Y is displayed or not

Allowed values:

showToOf : Boolean.
Default: true

Example of use:

 Copy
«•   »
AllowChangeNumRows

Description:

phpMyDataGrid allows to end user to modify the amount of records per page to display, if you don't like to allow the user to do that, set this property to false

Allowed values:

AllowChangeNumRows : Boolean.
Default: true

Example of use:

 Copy
«•   »
charset

Description:

Allow to define the page coding in which the page will be rendered.

Allowed values:

charset : String
Default: ISO-8859-1

Example of use:

 Copy
«•   »
sqlDataCoding

Description:

Defines the database encoding

Allowed values:

sqlDataCoding : String

Example of use:

 Copy
«•   »
sqlcharset

Description:

Defines the encoding to use by MySQL

Allowed values:

sqlcharset : String
utf8, big5, latin1, etc

Example of use:

 Copy
Atention: It is important to define this property as a complement to sqlDataCoding for a right working
«•   »
defaultdateformat

Description:

Defines the default format to date type fields

Allowed values:

defaultdateformat : Combination of dmy characters
Default: dmy

Example of use:

 Copy
«•   »
defaultdateseparator

Description:

Defines the date separator char.

Allowed values:

defaultdateseparator : 1 Character.
Default: /

Example of use:

 Copy
«•   »
csvSeparator

Description:

Character used to separate the values exported in CSV (Comma Separated Values)

Allowed values:

csvSeparator : 1 character
Default: ;

Example of use:

 Copy
«•   »
uploadDirectory

Description:

This property is used to define the folder where images will be uploaded

Allowed values:

uploadDirectory : path to images folder, it may be relative or absolute
Default: /

Example of use:

 Copy
Atention: Specified path must have write permissions.
«•   »
show404image

Description:

Defines if phpMyDataGrid would display a 404 image when the related image is not found.

Allowed values:

show404image : Boolean.
Default: false

Example of use:

 Copy
«•   »
retcode

Description:

By default, phpMyDataGrid is rendered at the end of the script execution, but if this property is changed to true, then the HTML code will be returned as value to be stored in a variable.

Allowed values:

retcode : Boolean
Default: false

Example of use:

 Copy
«•   »
getMyOwnButtons

Description:

It allows the developer to control the position of the buttons New / Search / Export, by not displaying them directly on the grid, but allows to be positioned in any section of your website.

Allowed values:

getMyOwnButtons : Boolean.
Default: false

Example of use:

 Copy
Atention: Note: To function, property retcode must be set to true.
«•   »
strAddBtn:

Function name:

This property complements getMyOwnButtons property, returning the HTML for add button

Example of use:

 Copy
«•   »
strSearchBtn:

Function name:

This property complements getMyOwnButtons property, returning the HTML for search button

Example of use:

 Copy
«•   »
strExportBtn:

Function name:

This property complements getMyOwnButtons property, returning the HTML for export button

Example of use:

 Copy
«•   »
cssPrinter

Description:

Define the CSS styles filename that will be used for printing.

Allowed values:

cssPrinter : Path and CSS filename
Default: css/b-w-print.css

Example of use:

 Copy
«•   »
PDFfont

Description:

Set the font to use when exporting to PDF

Allowed values:

PDFfont : FontName
Default: Arial

Example of use:

 Copy
«•   »
PDFfontsize

Description:

Set the font size to use when exporting to PDF

Allowed values:

PDFfontsize : Numeric.
Default: 7

Example of use:

 Copy
«•   »
PDFfill

Description:

It defines the RGB values for the background color for titles when exporting to PDF

Allowed values:

PDFfill : 
Default: array("R"=>192,"G"=>192,"B"=>192);

Example of use:

 Copy
«•   »
PDFdraw

Description:

It defines the RGB values for the color of the letter to export to PDF

Allowed values:

PDFdraw : 
Default: array("R"=>0,"G"=>0,"B"=>0);

Example of use:

 Copy
«•   »
actHeader

Description:

It is used to generate a header in the options: New, Edit, View.

Allowed values:

actHeader ['']:
 Copy
«•   »
actFooter

Description:

It is used to generate a footer in the options: New, Edit, View.

Allowed values:

actFooter ['']:
 Copy
«•   »
images

Description:

This property is a vector containing the names of the image files to be used as icons in the Datagrid.

Allowed values:

images ['']:
 Copy
Atention: If you change something in the name of image, make sure that the image exists in the folder of images
«•   »
message

Description:

This property is a vector that contains the descriptive texts to be used in the Datagrid, changing their values, you'll customize the datagrid to use your own texts

Allowed values:

message ['']:
 Copy
«•   »
debug

Description:

Generates messages to debug the results of phpMyDataGrid

Allowed values:

debug : Boolean.
Default: false

Example of use:

 Copy
«•   »
logSQLError

Description:

Defines whether or not the SQL errors will be recorded in a log file

Allowed values:

logSQLError : Boolean.
Default: true

Example of use:

 Copy
«•   »
logfile

Description:

Defines the filename and path to log SQL errors

Allowed values:

logfile : path and filename

Example of use:

 Copy
Atention: Filename must have write permissions
«•   »
processData

Description:

It is used to define the name of a function that pre-process the information from the database before being displayed in the grid, this property is useful (for example) if it requires changing the value of a date or put a prefix to an invoice number, etc.

Allowed values:

processData : Function name (without parenthesis or parameters)

Example of use:

 Copy
Atention: The function should receive an array as a parameter containing all the records display, and must return a new array with the elements modified
«•   »
nocenter

Description:

If this property is defined, the windows of action (add, edit, view, search, export) will not be centered in the window, but would remain in the upper left corner of the screen

Allowed values:

nocenter : Boolean.
Default: false

Example of use:

 Copy
«•   »
saveaddnew

Description:

Defines whether to add / edit displays the 'Save & New' button

Allowed values:

saveaddnew : Boolean.
Default: false

Example of use:

 Copy
«•   »
height

Description:

Define a fixed height for the grid, if the data is larger than grid height then a scrollbar will be displayed.

Allowed values:

height : Grid Height

Example of use:

 Copy
«•   »
btnOrder

Description:

Define the order to display the record buttons

Allowed values:

btnOrder : Any possible conbination of the following definitions: [E][V][D][Up][Dn]

Example of use:

 Copy
Atention: Next we will explain each button representation:
[E] = Adir Button
[V] = View Button
[D] = Delete Button
[Up]= Row Up Button
[Dn]= Row Down Button
«•   »
nowindow

Description:

Set this property to true if you do not want to have 'pop up' layers for data maintenance

Allowed values:

nowindow : Boolean.
Default: false

Example of use:

 Copy
«•   »
toolbar

Description:

Modify the grid interfase by adding a toolbar for icons.

Allowed values:

toolbar : Boolean.
Default: false

Example of use:

 Copy
«•   »
delchkbtn

Description:

This property works together with the toolbar property, set to true to add a button to the toolbar that allow to delete multiple checked rows.

Allowed values:

delchkbtn : Boolean.
Default: false

Example of use:

 Copy
Atention: This property must be activated only if the toolbar property is set to 'true', otherwise you may get unexpected results
«•   »
strExportInline

Description:

This property works together with the toolbar property, set to true to integrate the export window into the toolbar avoiding the use of popup layers.

Allowed values:

strExportInline : Boolean.
Default: false

Example of use:

 Copy
Atention: This property must be activated only if the toolbar property is set to 'true', otherwise you may get unexpected results
«•   »
strSearchInline

Description:

This property works together with the toolbar property, set to true to integrate the search window into the toolbar avoiding the use of popup layers.

Allowed values:

strSearchInline : Boolean.
Default: false

Example of use:

 Copy
Atention: This property must be activated only if the toolbar property is set to 'true', otherwise you may get unexpected results
«•   »
reload

Description:

This property works together with the toolbar property, set to true to add into the toolbar a button for refresh/reload the DataGrid.

Allowed values:

reload : Boolean.
Default: false

Example of use:

 Copy
Atention: This property must be activated only if the toolbar property is set to 'true', otherwise you may get unexpected results
«•   »
poweredby

Description:

Defines whether the phpMyDataGrid logo is displayed

Allowed values:

poweredby : Boolean.
Default: false

Example of use:

 Copy
«•   »