Column properties
- Column properties vary.
- Let's find out one by one.
let columns = [{
name : 'email',
header: {text:'email'},
type : 'string',
width : 300,
editable : true,
visible : true,
align : 'left',
scale : '18',
roundType : 'round',
fixedScale : true,
comma : 3,
showZero : true,
}];
name property
- The column name must be unique among the columns.
- Property value : (ex) 'email', 'username'
text property
- Same as header name
- Property value : (ex) 'qty', 'sale amount'
type property
- Specifies the type of column.
- Property value : string, number, date, and combo.
width property
- It is a number that indicates the width of the column.
- Property value : (ex) 100, 140, 60
editable property
- Indicates whether the column is editable.
- Property value : true, false
visible property
- You can hide or show columns.
- Property value : true, false
align property
- You can specify the horizontal alignment of the column.
- Property value : left, center, right
scale property
- Applies when type is number
- Property value : (ex) '18, 0', '10', '10.5'
roundType property
- Applies when type is number. Responsible for handling decimal points.
- Property value : round, ceil, floor.
fixedScale property
- Applies when type is number
- Indicates whether the decimal place is fixed
showZero property
- Applies when type is number
- Indicate whether to show 0
- Property value : true, false