ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: bsolteam on April 22, 2014, 10:13:04 am
-
Hi,
I tried to get rowIndex by using the cell value. For example if am giving the cell value like VOYAGE it needs to print the rowIndex like 2. I used the following code
var obj = $( "#VoyageDetails_tab_main" ).pqGrid( "getRowIndx", {tr:"VOYAGE HEIGHT"});
var rowIndx = obj.rowIndx;
alert(rowIndx);
am always getting undefined only. What i need to put in that colored area or else what i did wrong. Any one help me.
-
getRowIndx can't get rowIndx from a cell value. you could use this code to get rowIndx from cell value.
var data=$grid.pqGrid( 'option', 'dataModel.data' );
var rowIndx;
for (var i=0;i<data.length;i++){
var rowData=data[ i ];
for(var dataIndx in rowData ){
if(rowData[dataIndx] == "VOYAGE HEIGHT"){
rowIndx = i;
break;
}
}
}
alert( rowIndx );
-
Thanks For your reply. It is performing nice.