I am using jqgrid for REaltime Stock Updates but when i am trying to update particular row based on Cell Value,it is not working it is updating only last row.
i am using following code for updating and searching
resultOut.MarketName is Symbo name which is coming for Realtime Data
var rowIds = $(“#Quotes”).jqGrid(‘getDataIDs’);
if (symbollist.indexOf(resultOut.MarketName) > -1) {
if (rowIds.length > 0) {
for (i = 1; i <= rowIds.length; i++) {
rowData = $(“#Quotes”).jqGrid(‘getRowData’, i);
if (rowData[‘Symbol’] == resultOut.MarketName) {
var row = $(“#Quotes”).jqGrid(‘setSelection’, i);
var rowid = row.index();
$(“#Quotes”).jqGrid(‘setCell’, rowid , ‘Bid’, resultOut.Bid);
$(“#Quotes”).jqGrid(‘getLocalRow’, rowid ).Bid = resultOut.Bid;
$(“#Quotes”).jqGrid(‘setCell’, rowid , ‘Ask’, resultOut.Ask);
$(“#Quotes”).jqGrid(‘getLocalRow’, rowid ).Ask = resultOut.Ask;
$(“#Quotes”).jqGrid(‘setCell’, rowid , ‘LTP’, resultOut.Price);
$(“#Quotes”).jqGrid(‘getLocalRow’, rowid ).LTP = resultOut.Price;
} //if
} //for
}
} else {
AddRealTimeQuotes(resultOut);
symbollist = symbollist + “|” + resultOut.MarketName;
}