About autofill and background color
About autofill and background color
Topic 1 Autofill. When filling columns by dragging the value of a cell, the data is copied but not updated in the database.
Ex: It can be seen in:
https://www.pavanconsultores.com.ar/pruebas/pru01.php
where you try to copy the value of the cell in the row with ID 8, column SEM 07 down.
Topic 2: Background color Cells are colored according to a conditional, but when copying data by dragging, the color is refreshed only in those cells with NULL values, if the cell has some other value the color is not modified according to the new data.
This question has an accepted answers - jump to answer
Answers
Topic 1: see this example here. Look at the config for
autofill
, you'll see you need to reference Editor.Topic 2: I dragged a few 0s, and the they were colour red. I'm not seeing any background colour changes for any cells, only foreground.
Colin
Topic 1: If I enter the reference to the EDITOR:
autoFill: {
columns: ': not (: first-child)',
editor: editor,
},
the values are no longer copied to the new cells, and therefore, they are not saved in the DB either. (see https://www.pavanconsultores.com.ar/pruebas/pru02.php)
Topic 2: If you drag the value 1 of the row with ID 10, SEM 06, to ID 10 and SEM 02, the values are copied, but should be done in blue.
Some help ?
Could you update your page to include the
autoFill.editor
option please? As Colin indicates, if you want to use Editor and AutoFill together, they need to know that the other exists.Also are you using our PHP libraries or your own? If your own, they need to support multi-row editing for AutoFill to work.
Allan
Thanks Allan.
Topic 1: an obvious detail was missing: indicate the primary key of the table
rowId: 'flow_v1.flw_codflw',
autoFill: {
columns: ':not(:first-child)',
editor: editor
},
And now it works correctly,
Topic 2: in https://www.pavanconsultores.com.ar/pruebas/pru01.php if I change a null or a 1 to a 0 the color changes to red but changing from 0 to 1 does not change to blue
Regards,
jorge.
2) You've got competing styles:
You need to add
.removeClass('hihlightred')
before adding the blue. And likewise remove the blue before adding the red.Allan
Thanks Allan.
Best regards,
jorge.