Apologies for the misinformation in the above post. I have updateRow working, but it only takes one argument (of a complex object) and not two.
Here is my function, which updates a datagrid with two fields (Action and Parameters):
function tasks_ChangeTask(){
var selectedrow = $("#tasks-datagrid").datagrid("getSelected");
var rowIndex = $("#tasks-datagrid").datagrid("getRowIndex", selectedrow);
var rowData = {
Action : $("#task-dialog-action").combobox("getValue"),
Parameters : $("#task-dialog-parameters").val()
};
var param = {
index: rowIndex,
row: rowData
};
$("#tasks-datagrid").datagrid("updateRow", param);
// close dialog
$("#task-dialog").dialog("close");
}
I still want to know how to get the selected row index easily in one step instead of two
I might have a datagrid with multiple rows that are exactly the same.