jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Get data (cell) into validation field ?
This topic contains 2 replies, has 1 voice, and was last updated by nico86 11 years ago.
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
Hi,
First sorry for my english…when I modified a cell (column STATUT), i would like get the field NAME of the row modified ?
I try to get data like this but how replace 0 by the value of the row modified (THIS) ?identity= $(“#jqxgrid”).jqxGrid(‘getcellvalue’, THIS, ‘NAME’);
Thanks
columns: [ { text: 'Name', datafield: 'NAME', width: 80, editable: false }, { text: 'Sex', datafield: 'SEX', width: 120, editable: false }, { text: 'Age', datafield: 'AGE', width: 120, cellsalign: 'right', editable: false }, { text: 'Height', datafield: 'HEIGHT', width: 120, cellsalign: 'right', editable: false }, { text: 'Weight', datafield: 'WEIGHT', width: 120, cellsalign: 'right', editable: false }, { text: 'Statut',columntype: 'dropdownlist',source:src, datafield: 'STATUT', width: 80, editable: true , createeditor: function (row, column, editor) { editor.jqxDropDownList({ autoDropDownHeight: true, source: src }); }, validation: function (cell, value) { if (value == "SENT") { identity= $("#jqxgrid").jqxGrid('getcellvalue', 0, 'NAME'); /*VALUE OF THE FIELD NAME OF THE LINE MODIFIED */; alert(identity); // NOT OK ; $.ajax({ type : 'POST', // envoi des données en GET ou POST url : '', // url du fichier de traitement data : 'value='+value+'&identity='+identity, success : '' }); } return true; } } ]
I try to add this to get selected row number, but it seem it don’t run into “validation”.
$("#jqxgrid").bind('rowselect', function (event) { var row = event.args.rowindex; }) ; identity= $("#jqxgrid").jqxGrid('getcellvalue', row, 'NAME');
it’s ok if i put this outside of validation ;
$(“#jqxgrid”).bind(‘rowselect’, function (event) {
row = event.args.rowindex;
}) ;My problem is closed
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.