Hello, im starting with easyui and
i would like to save the lines of editable datagrid.
I have this code for Row editing:
var editIndex = undefined;
function endEditing(){
if (editIndex == undefined){return true}
if ($('#tt').datagrid('validateRow', editIndex)){
var ed = $('#tt').datagrid('getEditor', {index:editIndex,field:'id'});
var descricao = $(ed.target).combobox('getText');
$('#tt').datagrid('getRows')[editIndex]['codmat'] = descricao;
$('#tt').datagrid('endEdit', editIndex);
editIndex = undefined;
return true;
} else {
return false;
}
}
function onDblClickRow(index){
if (editIndex != index){
if (endEditing()){
$('#tt').datagrid('selectRow', index)
.datagrid('beginEdit', index);
editIndex = index;
} else {
$('#tt').datagrid('selectRow', editIndex);
}
}
}
and must pass all the data to the php and db.
Someone can tell me how starts?