Last updated
Last updated
"Simple column HTML" is where we let the grid do the most of the work for us when it comes to adding css classes/markup. We only add <v-grid-col>
inside the <v-grid>
element with some attributes. Lets look on a small sample to get started.
First we will need to define the required variable in our class : *v-collection
For the HTML we :
bind the variables we just created.
set row & header height.
add the v-grid-col
with a col-field
attribute for the field in collection we want.
To add filters/sorting to grid we will need to add more attributes.
This will then produced the grid you see in the picture below Some features are enabled be default when using "simple column HTML"
Drag drop headers
re-size of columns
Observing changes on from/to grid/current entity.
col-width
col-type
col-field (REQUIRED)
col-sort
col-header-name
col-filter
col-filter-top
col-css
col-add-row-attributes
col-add-filter-attributes
default is 100
sets the width of the column
default is "text"
options are "selection", "checkbox" or "image"
field/property of the data from collection
default is ""
field name you want to do sorting on
default is col-field where first letter is set to uppercase
see v-filter in chapter 04 for more details
default is false
use false/true to set filter above/under label in header
css you want to add, usefull with on-row draw event for setting colors based on values
here you can put whatever you want and it gets added to row column, useful for own custom attributes
here you can put whatever you want and it gets added header column, useful for own custom attributes