jQWidgets Forums

jQuery UI Widgets Forums Grid Row Editing based on cell value

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Row Editing based on cell value #55475

    mangeshsingh
    Participant

    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;
    }

    Row Editing based on cell value #55477

    Peter Stoev
    Keymaster

    Hi mangeshsingh,

    Sorry, but you don’t use our Grid :). Our Grid is jqxGrid and it does not have the API which you use.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.