Filter Operations on Server

Filter Operations on Server

Najib NajiNajib Naji Posts: 6Questions: 2Answers: 0
edited February 2020 in Free community support

Hi dears I have a problems with filter it can't filter operation like

{
                        "mRender": function(data, type, row) {
                            return parseInt(row.salesprice / row.number - row.buyingprice / row.number);
                        }
and 
    {
                        "mRender": function(data, type, row) {
                            return parseInt(row.number - row.sum);
                        }
plss help me 
 **it is my filter code **

fixedHeader: true,
            pageLength: -1,
            initComplete: function () {
                this.api().columns().every( function () {
                    var column = this;
                    var select = $('<select style="width:100%"><option value=""></option></select>')
                        .appendTo( $(column.header()))
            .on( 'click', function (e) {
                e.stopPropagation();
            })
                        .on( 'change', function () {
                            var val = $.fn.dataTable.util.escapeRegex(
                                $(this).val()
                            );

                            column
                                .search( val ? '^'+val+'$' : '', true, false )
                                .draw();
                        } );

                    column.data().unique().sort().each( function ( d, j ) {
                        select.append( '<option value="'+d+'">'+d+'</option>' )
                    } );
                } );
            },

it is the result

Edited by Kevin:  Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Answers

This discussion has been closed.