ArtiGrid
v1.5

Inline Edit

This demo showcases the inline editing feature in ArtiGrid. By enabling inlineEdit(), users can modify data directly within the table without opening a separate form or modal.

ArtiGrid supports multiple field types for inline editing, including text, textarea, date, and select/combobox inputs.

In this example, the lastName field is configured as a textarea and officeCode as a selectable dropdown. This improves user experience, speeds up data entry, and helps enforce valid input options directly within the grid.


<?php
    $grid = new ArtiGrid();
    $grid->table('employees')
        ->template('bootstrap5')
        ->unset('filter', false)
        ->setFieldType('lastName', 'textarea')
        ->setFieldType('officeCode', 'select') // Define field type in online editing
        ->setSelect('officeCode', [
            "2" => 'Boston',
            "7" => 'London',
            "3" => 'NYC',
            "4" => 'Paris',
            "1" => 'San Francisco',
            "6" => 'Sydney',
            "5" => 'Tokyo'
        ])
        ->inlineEdit() // Activate online editing
        ->combobox('officeCode','offices','officeCode','city')
        ->perPage(10)
        ->modal();
    echo $grid->render();
?>
employeeNumber lastName firstName extension email officeCode reportsTo jobTitle Actions