Hi there,
i want to update datagrid rows by calling a function with the field and value.
How can i use the field variable to update the row?
function update_contact_row(field, value) {
var rows = $('#table_contacts_contacts').datagrid('getRows');
for (var i=0; i < rows.length; i++) {
if (rows[i].id == "{{contacts_id}}") {
$('#table_contacts_contacts').datagrid('updateRow', {
index: i,
row: {
$field: value
}
});
}
}
}