ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: dbadmin on February 24, 2015, 10:50:52 pm
-
Hi,
I'm trying to access ui.rowData in a column editor, and this property doesn't seem to be defined.
{title:"ID", width:150, dataType:"string",editable: true, dataIndx:"ID",
editor:{
type:'textbox',
getData: function (ui)
{
if (ui.rowData != null) // it's always null
{
var val = 1;
}
}
}}
I'm using v 2.2.0. Is it a known issue or am I doing something wrong?
-
Your code is fine, rowData is not available in editor.getData callback.
you can get rowData from rowIndx by http://paramquery.com/pro/api#method-getRowData method.
inside getData callback:
var rowData = $(this).pqGrid( 'getRowData', {rowIndx: ui.rowIndx});