HandsonTable Cell Features

HandsonTable provides cell features like Data validation, Drag down, Merged cells, Alignment, Read-only & Disabled editing.

Data validation

Use the validator (see options page) method to easily validate synchronous or asynchronous changes to a cell. If you need more control, beforeValidate and afterValidate plugin hooks are available (see hooks page). In the below example, email_validator_fn is an async validator that resolves after 1000 ms.

Use the allowInvalid option (see options page) to define if the grid should accept input that does not validate. If you need to modify the input (e.g. censor bad words, uppercase first letter), use the plugin hook beforeChange (see hooks page).

By default all invalid cells are marked by htInvalid CSS class. If you want to change class to another you can basically add the invalidCellClassName option to Handson table settings. For example.

ID
First name
Last name
IP
E-mail
1JoeFabiano0.0.0.1Joe.Fabiano@ex.com
2FredWecler0.0.0.1Fred.Wecler@ex.com
3SteveWilson0.0.0.1Steve.Wilson@ex.com
4MariaFernandez0.0.0.1M.Fernandez@ex.com
5PierreBarbault0.0.0.1Pierre.Barbault@ex.com
6NancyMoore0.0.0.1Nancy.Moore@ex.com
7BarbaraMacDonald0.0.0.1B.MacDonald@ex.com
8WilmaWilliams0.0.0.1Wilma.Williams@ex.com
9SashaSilver0.0.0.1Sasha.Silver@ex.com
10DonPérignon0.0.0.1Don.Pérignon@ex.com
11AaronKinley0.0.0.1Aaron.Kinley@ex.com
ID
First name
Last name
IP
E-mail

Callback console: [[row, col, oldValue, newValue], ...]

Edit the above grid to see callback


                

Drag down in all directions

Notice the little square (fill handle) in the corner of the selected cell. You can drag it (drag-down) to repeat the values from the cell. Double click the fill handle in cell B4 (value "30") to fill the selection down to the last value in neighbouring column, just like it would in LibreOffice or google Docs.

 
A
B
C
D
E
1
KiaNissanToyotaHonda
2
201210111213
3
201320111413
4
201430151213
5
2015
6
2016
 
A
B
C
D
E
 
1
2
3
4
5
6
 

Merged cells

To enable the merge cells feature, set the mergeCells option to be true or an array. To initialize Handson table with predefined merged cells, provide merged cells details in form of an array: mergeCells: [{row: 1, col: 1, rowspan: 2, colspan: 2}]

 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
1
A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1
2
A2B2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2
3
A3E3F3G3H3I3J3K3L3M3N3O3P3Q3R3
4
A4E4G4H4I4J4K4L4M4N4O4P4Q4R4
5
A5B5C5D5G5H5I5J5K5L5M5N5O5P5Q5R5
6
A6B6C6D6E6F6G6J6K6L6M6N6O6P6Q6R6
7
A7B7C7D7E7F7J7K7L7M7N7O7P7Q7R7
8
A8B8C8D8E8F8J8K8L8M8N8O8P8Q8R8
9
A9B9C9D9E9F9G9H9I9J9K9L9M9N9O9P9Q9R9
10
A10B10C10D10E10F10G10H10I10J10K10L10M10N10O10P10Q10R10
11
A11B11C11D11E11F11G11H11I11J11K11L11M11N11O11P11Q11R11
12
A12B12C12D12E12F12G12H12I12J12K12L12M12N12O12P12Q12R12
13
A13B13C13D13E13F13G13H13I13J13K13L13M13N13O13P13Q13R13
14
A14B14C14D14E14F14G14H14I14J14K14L14M14N14O14P14Q14R14
15
A15B15C15D15E15F15G15H15I15J15K15L15M15N15O15P15Q15R15
16
A16B16C16D16E16F16G16H16I16J16K16L16M16N16O16P16Q16R16
17
A17B17C17D17E17F17G17H17I17J17K17L17M17N17O17P17Q17R17
18
A18B18C18D18E18F18G18H18I18J18K18L18M18N18O18P18Q18R18
19
A19B19C19D19E19F19G19H19I19J19K19L19M19N19O19P19Q19R19
20
A20B20C20D20E20F20G20H20I20J20K20L20M20N20O20P20Q20R20
21
A21B21C21D21E21F21G21H21I21J21K21L21M21N21O21P21Q21R21
22
A22B22C22D22E22F22G22H22I22J22K22L22M22N22O22P22Q22R22
23
A23B23C23D23E23F23G23H23I23J23K23L23M23N23O23P23Q23R23
24
A24B24C24D24E24F24G24H24I24J24K24L24M24N24O24P24Q24R24
25
A25B25C25D25E25F25G25H25I25J25K25L25M25N25O25P25Q25R25
 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 

Alignment

To initialize Handson table with predefined horizontal and vertical alignment, provide className cells details in form of a grid, columns or cell setting (see code sample below).

Available classNames:

  • Horizontal: htLeft, htCenter, htRight, htJustify,
  • Vertical: htTop, htMiddle, htBottom.
  • Alignment changes can be tracked using afterSetCellMeta hook callback.
 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
1
A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1
2
A2B2E2F2G2H2I2J2K2L2M2N2O2P2Q2R2
3
A3E3F3G3H3I3J3K3L3M3N3O3P3Q3R3
4
A4E4G4H4I4J4K4L4M4N4O4P4Q4R4
5
A5B5C5D5G5H5I5J5K5L5M5N5O5P5Q5R5
6
A6B6C6D6E6F6G6H6I6J6K6L6M6N6O6P6Q6R6
7
A7B7C7D7E7F7G7H7I7J7K7L7M7N7O7P7Q7R7
8
A8B8C8D8E8F8G8H8I8J8K8L8M8N8O8P8Q8R8
9
A9B9C9D9E9F9G9H9I9J9K9L9M9N9O9P9Q9R9
10
A10B10C10D10E10F10G10H10I10J10K10L10M10N10O10P10Q10R10
11
A11B11C11D11E11F11G11H11I11J11K11L11M11N11O11P11Q11R11
12
A12B12C12D12E12F12G12H12I12J12K12L12M12N12O12P12Q12R12
13
A13B13C13D13E13F13G13H13I13J13K13L13M13N13O13P13Q13R13
14
A14B14C14D14E14F14G14H14I14J14K14L14M14N14O14P14Q14R14
15
A15B15C15D15E15F15G15H15I15J15K15L15M15N15O15P15Q15R15
16
A16B16C16D16E16F16G16H16I16J16K16L16M16N16O16P16Q16R16
17
A17B17C17D17E17F17G17H17I17J17K17L17M17N17O17P17Q17R17
18
A18B18C18D18E18F18G18H18I18J18K18L18M18N18O18P18Q18R18
19
A19B19C19D19E19F19G19H19I19J19K19L19M19N19O19P19Q19R19
20
A20B20C20D20E20F20G20H20I20J20K20L20M20N20O20P20Q20R20
21
A21B21C21D21E21F21G21H21I21J21K21L21M21N21O21P21Q21R21
22
A22B22C22D22E22F22G22H22I22J22K22L22M22N22O22P22Q22R22
23
A23B23C23D23E23F23G23H23I23J23K23L23M23N23O23P23Q23R23
24
A24B24C24D24E24F24G24H24I24J24K24L24M24N24O24P24Q24R24
25
A25B25C25D25E25F25G25H25I25J25K25L25M25N25O25P25Q25R25
 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 

Read-only columns

In many usage cases, you will need to configure a certain column to be read only. This column will be available for keyboard navigation and CTRL+C. Only editing and pasting data will be disabled.

To make a column read-only, declare it in the columns setting. You can also define a special renderer function that will dim the read-only values.

Car
Year
Chassis color
Bumper color
Nissan2012blackblack
Nissan2013blueblue
Chrysler2014yellowblack
Volvo2015whitegray
Car
Year
Chassis color
Bumper color

Non-editable columns

In many cases you will need to configure a certain column to be non-editable. Doing it does not change it's basic behavior (apart from editing), which means you are still available to use keyboard navigation, CTRL+C and CTRL+V functionalities, drag-to-fill etc.

To make a column non-editable, declare it in the columns setting. You can also define a special renderer function that will dim the editor value.

Car
Year
Chassis color
Bumper color
Nissan2012blackblack
Nissan2013blueblue
Chrysler2014yellowblack
Volvo2015whitegray
Car
Year
Chassis color
Bumper color

Theme Customizer


Customize & Preview in Real Time

Menu Color Options

Layout Options

Navigation Color Options
Solid
Gradient

Solid

Gradient

Buy Now