jQWidgets Forums

jQuery UI Widgets Forums Grid How I can get value of cell on selected row when press "+" ?

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 8 years, 7 months ago.

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

  • digikv
    Participant

    How I can get value of cell SIFRA on selected row when press “+” ?
    $(“#tabela”).jqxGrid(
    {
    width: “100%”,
    height: 400,
    source: dataAdapterT,
    theme: ‘arctic’,
    handlekeyboardnavigation: function(event)
    {
    var selectedrowindex = $(“#tabela”).jqxGrid(‘getselectedrowindex’);
    var id = $(“#tabela”).jqxGrid(‘getrowid’, selectedrowindex);
    var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
    if (key == 107) {
    alert(‘Pressed + Key.’+$(‘#tabela’).jqxGrid(‘getselectedrowindex’));
    return true;
    }
    else if (key == 109) {
    alert(‘Pressed – Key.’);
    return true;
    }
    },
    columns: [
    { text: ‘Шифра’, datafield: ‘SIFRA’, width: 200, cellclassname: cellclass },
    { text: ‘Назив’, datafield: ‘NAZIV’, width: 200, cellclassname: cellclass },
    { text: ‘Количина’, datafield: ‘KOLICINA’, width: 180, cellsalign: ‘right’, cellclassname: cellclass },
    { text: ‘Цена’, datafield: ‘CENA’, width: 80, cellsalign: ‘right’, cellclassname: cellclass },
    { text: ‘Изабран’, datafield: ‘IZABRANO’, width: 80, cellclassname: cellclass }
    ]
    });


    Hristo
    Participant

    Hello digikv,

    You could use getrowdatabyid method for this selected row.
    Please, take a look at this example below:

    var rowid = $('#tabela').jqxGrid('getrowid', rowindex);
    var data = $('#tabela').jqxGrid('getrowdatabyid', rowid);
    var valueOfSifraOnSelectedRow = data['SIFRA'];

    Best Regards,
    Hristo Hristov

    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.