DHTMLX Docs & Samples Explorer

Index
dhtmlxDataView

## Items editing

To enable item editing ability the next steps need to be done

1. edit mode enabled
2. edit template defined

        view = new dhtmlXDataView({
    	container:"data_container",
    	edit:true,
    	type:{
                template:"#Package# : #Version#<br/>#Maintainer#",
                template_edit:"<input class='dhx_item_editor' bind='obj.Package'>"
            }
        });

Edit template works the same as normal one plus, tags inside it can have bind attribute. Which means than during switching to the edit state, component will put related properties in inputs, and on edit-end command , properties will be filled from the inputs respectfully.

Edit process is triggered by dbl-click by default.

You can switch cell to edit manually by using

        view.edit(id);
        view.stopEdit();