7. Give a name and description to the Table Grid Editor.
For example, if you are going to use the Table Grid Editor
to store offers made to the customer, you can call it Quotes.
13. Get the configuration files
used in this Example
> Download <
Continue this presentation for the Explanation of the configuration file
14. Basic configuration of the Table Grid and where to store its contents
gd.tablename=quotes
gd.ds=jira
gd.visiblerows = auto
gd.delete.confirmation = true
Name of the table in database
15. Basic configuration of the Table Grid and where to store its contents
gd.tablename=quotes
gd.ds=jira
gd.visiblerows = auto
gd.delete.confirmation = true
Where contents of table is to be stored (datasource)
16. Basic configuration of the Table Grid and where to store its contents
gd.tablename=quotes
gd.ds=jira
gd.visiblerows = auto
gd.delete.confirmation = true
Let Table Grid decide how many rows to show
17. Basic configuration of the Table Grid and where to store its contents
gd.tablename=quotes
gd.ds=jira
gd.visiblerows = auto
gd.delete.confirmation = true
ask for confirmation before deleting a set of rows
18. Define the column specifications
gd.columns = nr, prodtype, descr, quant, unitprice, total
Column Identifiers
19. Let’s define the Nr column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.nr=Nr
col.nr.type=integer
col.nr.required=true
col.nr.width=50
Column header name
20. Let’s define the Nr column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.nr=Nr
col.nr.type=integer
col.nr.required=true
col.nr.width=50
Column type
21. Different Supported Column Types
col.name.type = ( checkbox | date | integer | list | number | radio | sequence | string | textarea )
Some Examples:
textarea
number
integer
list
radio
date
22. Let’s define the Nr column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.nr=Nr
col.nr.type=integer
col.nr.required=true
col.nr.width=50
The field must be filled in, if forgotten tell the user
23. Let’s define the Nr column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.nr=Nr
col.nr.type=integer
col.nr.required=true
col.nr.width=50
Width of column in pixels
24. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
25. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
Column header name
26. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
Column type, “list” = elements in a dropdown box
27. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
Width of column in pixels
30. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
# Dropdown list of options embedded in configuration file
How many elements are in the dropdown
col.prodtype.list.size=3
list
col.prodtype.value1=Consultancy
col.prodtype.value2=Maintenance
col.prodtype.value3=License
31. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
# Dropdown list of options embedded in configuration file
col.prodtype.list.size=3
col.prodtype.value1=Consultancy
Specify the values from which the user can
col.prodtype.value2=Maintenance
choose in the dropdown list
col.prodtype.value3=License
33. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
# Dropdown list of options from external SQL database
col.prodtype.query=SELECT name, id FROM products WHERE STATUS='A'
col.prodtype.ds=erp
SQL Query to populate the elements
in the list from an external database.
34. Let’s define the Product Code column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.prodtype=Product Code
col.prodtype.type=list
col.prodtype.width=150
# Dropdown list of options from external SQL database
col.prodtype.query=SELECT name, id FROM products WHERE STATUS='A'
col.prodtype.ds=erp
Name of the data source to be used where the SQL query
needs to be executed.
37. Let’s define the Description column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.descr=Description
col.descr.type = string
col.descr.width=180
col.descr.maxLength=40
Name of column header
38. Let’s define the Description column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.descr=Description
col.descr.type = string
col.descr.width=180
col.descr.maxLength=40
Plain text field
39. Let’s define the Description column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.descr=Description
col.descr.type = string
col.descr.width=180
col.descr.maxLength=40
Width of 180px defined
40. Let’s define the Description column
gd.columns = nr, prodtype, descr, quant, unitprice, total
col.descr=Description
col.descr.type = string
col.descr.width=180
col.descr.maxLength=40
Max. length of the description set to 40
41. gd.columns = nr, prodtype, descr, quant, unitprice, total
Let’s define the Qty and
Unit Price column
col.quant=Qty
col.quant.type=number
col.quant.sortable=true
col.quant.required=true
Header name of the column
col.unitprice=Unit Price
col.unitprice.type=number
col.unitprice.sortable=true
col.unitprice.required=true
Header name of the column
42. gd.columns = nr, prodtype, descr, quant, unitprice, total
col.quant=Qty
col.quant.type=number
col.quant.sortable=true
col.quant.required=true
col.unitprice=Unit Price
col.unitprice.type=number
col.unitprice.sortable=true
col.unitprice.required=true
Let’s define the Qty and
Unit Price column
Cell contents can contain numbers
Cell contents can contain numbers
43. gd.columns = nr, prodtype, descr, quant, unitprice, total
Let’s define the Qty and
Unit Price column
col.quant=Qty
col.quant.type=number
col.quant.sortable=true
col.quant.required=true
Allow the user to sort the column by
clicking the column header
col.unitprice=Unit Price
col.unitprice.type=number
col.unitprice.sortable=true
col.unitprice.required=true
Allow the user to sort the column by
clicking the column header
44. gd.columns = nr, prodtype, descr, quant, unitprice, total
Let’s define the Qty and
Unit Price column
col.quant=Qty
col.quant.type=number
col.quant.sortable=true
col.quant.required=true
Cell contents must be filled in
col.unitprice=Unit Price
col.unitprice.type=number
col.unitprice.sortable=true
col.unitprice.required=true
Cell contents must be filled in
45. gd.columns = nr, prodtype, descr, quant, unitprice, total
col.total=Total
col.total.type=number
col.total.editable=false
col.total.sortable=true
col.total.formula = {quant} * {unitprice}
col.total.summary=sum
Let Table Grid calculate
the total for each row
Prevent the field to be editable by the user
46. gd.columns = nr, prodtype, descr, quant, unitprice, total
col.total=Total
col.total.type=number
col.total.editable=false
col.total.sortable=true
col.total.formula = {quant} * {unitprice}
col.total.summary=sum
Let Table Grid calculate
the total for each row
Put the column identifiers between
{ } and use arithmetic notation. For
all possibilities with formulas, have
a look at the Formula Manual
47. gd.columns = nr, prodtype, descr, quant, unitprice, total
col.total=Total
col.total.type=number
col.total.editable=false
col.total.sortable=true
col.total.formula = {quant} * {unitprice}
col.total.summary=sum
Add a bottom row with sum of all
values in the total column
48. Get Table Grid Editor addon
from the
JIRA Marketplace
> Download <