Aug 14, 2013, 7:17 PM
[CLOSED] row on directMethod in grid editor dont work
in a grid editor with a directMethod in version 1.x working for obtain a row of the gridPanel but in version 2.x dont working.
<script type="text/javascript"> var edit = function (editor, e) {
/*
"e" is an edit event with the following properties:
grid - The grid
record - The record that was edited
field - The field name that was edited
value - The value being set
originalValue - The original value for the field, before the edit.
row - The grid table row
column - The grid Column defining the column that was edited.
rowIdx - The row index that was edited
colIdx - The column index that was edited
*/
// Call DirectMethod
if (e.value !== e.originalValue) {
ValorX.AfterEdit(e.record.data.OID, e.value, e.record, e.row);
}
};
[DirectMethod(Namespace = "ValorX")]
public void AfterEdit(int oid, string newValue, int row)
{
prodCotizar = (DataTable)Session["tablaprodCotizar"];
prodCotizar.Rows[row].BeginEdit();
prodCotizar.Rows[row][4] = Convert.ToDouble(newValue);
prodCotizar.Rows[row].EndEdit();
}
Last edited by Daniil; Aug 20, 2013 at 9:19 AM.
Reason: [CLOSED]