jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • natg504
    Participant

    I’m having the same issue as Nidhi. The demo does work, but my code still returns only the last item as an object. Was a solution ever found to this?


    natg504
    Participant

    This bug is still unresolved. Are there any suggestions?


    natg504
    Participant

    I was having the same issue with the buttonclick event. The CSS code did fix that issue, but I have found another. My code changes the icon based on a value in the row. This works, but when you scroll the grid, the icons change once they hit the top of the table. If you update the code in the example above with this code, you can see the issue.

     $("#jqxgrid").jqxGrid(
                {
                    width: 670,
                    source: source,
                    pageable: true,
                    height: 250,
                    ready: function(){ console.log("ready")},
                    columns: [
                        { text: 'First Name', datafield: 'firstname', width: 100 },
                        { text: 'Last Name', datafield: 'lastname', width: 100 },
                        { text: 'Product', datafield: 'productname', width: 180 },
                        { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right', cellsrenderer: cellsrenderer },
                        { text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsrenderer: cellsrenderer, cellsformat: 'c2' },
                        { text: 'Total', datafield: 'total', cellsalign: 'right', cellsformat: 'c2' },
                        { text: '<i class="fa fa-pencil fa-lg fa-fw"> </i>',
                            datafield : 'Edit',
                            width: '5%',
                            columntype: 'button',
                            cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) {
                                if (row %2 ==0){
                                return '<i class="fa fa-pencil fa-lg fa-fw"> </i>';
                                }else{
                                    
                                return '<i class="fa fa-times fa-lg fa-fw"> </i>';
                                }
                            },
                            buttonclick : function(row){
                                alert('hey ' + row);
                            }   
                        }
                    ]
                });
Viewing 3 posts - 1 through 3 (of 3 total)