Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all 82628 articles
Browse latest View live

DataTables Excel Buttons Not Show With Vue Cli

$
0
0

Hi,

This is my tableCompenent.vue
This component not show excel button.
Where is my fault ?
I read all forum post.
And I inspect Allan Full Extension Post
I must be missing something.
I've been working on it for 5 days. I'm about to give up.

<script>

import dataTablesTrJson from './../../../assets/dataTable.tr.json';
import DataTable from 'datatables.net-vue3';
import DataTablesLib from 'datatables.net';
import 'datatables.net-select';
import 'datatables.net-buttons';
import 'datatables.net-buttons/js/buttons.html5';
DataTable.use(DataTablesLib);

export default {
  components: {
    DataTable,
  },
  data() {
    return {
      options: {
        language: dataTablesTrJson ,
        data:[
          {name:"Allan",Surname:"Allan"}
          {name:"Bob",Surname:"Marley"}

        ]
        dom: 'Bfrtip',
        columns: [
         {
          title: "İsim",
          data: 'name',
          width:'10%'
         },
         {
          title: "Soyisim",
          data: 'position',
         }
        ]
        buttons: [
          'copy', 'csv', 'excel', 'pdf', 'print'
        ]
      },
    };
  },
  created() {

  }
};
</script>
<template>
  <div class="card card-body">
    <DataTable :data="data"  :options="options" class="table dataTable table-bordered"> 
      <thead>
        <tr>
          <th>Name</th>
          <th>Surname</th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <th>Name</th>
          <th>Surname</th>
        </tr>
      </tfoot>

    </DataTable>
  </div>
</template>

My package.json


{ "name": "karacaguard", "version": "1.0.0", "private": true, "scripts": { "serve": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "build": "set NODE_OPTIONS=--openssl-legacy-provider &&vue-cli-service build", "lint": "set NODE_OPTIONS=--openssl-legacy-provider &&vue-cli-service lint" }, "dependencies": { "@anivive/vue3-form-wizard": "^1.0.1", "@ckeditor/ckeditor5-build-classic": "^31.1.0", "@ckeditor/ckeditor5-vue": "^2.0.1", "@fullcalendar/bootstrap": "^5.10.1", "@fullcalendar/core": "^5.10.1", "@fullcalendar/daygrid": "^5.10.1", "@fullcalendar/interaction": "^5.10.1", "@fullcalendar/list": "^5.10.1", "@fullcalendar/timegrid": "^5.10.1", "@fullcalendar/vue": "^5.10.1", "@fullcalendar/vue3": "^5.10.1", "@j-t-mcc/vue3-chartjs": "^1.2.0", "@vue-leaflet/vue-leaflet": "^0.6.1", "@vueform/multiselect": "^2.3.1", "@vueform/slider": "^2.0.8", "@vuelidate/core": "^2.0.0-alpha.34", "@vuelidate/validators": "^2.0.0-alpha.26", "apexcharts": "^3.33.0", "axios": "^1.3.1", "bootstrap": "^5.1.3", "bootstrap-vue-3": "^0.1.0", "datatables.net-buttons": "^2.3.2", "datatables.net-buttons-dt": "^2.3.2", "datatables.net-dt": "^1.13.1", "datatables.net-select": "^1.5.0", "datatables.net-select-dt": "^1.5.0", "datatables.net-vue3": "^2.0.0", "chart.js": "^3.7.0", "click-outside-vue3": "^4.0.1", "core-js": "^3.6.5", "dropzone": "^6.0.0-beta.2", "echarts": "^5.3.0", "jwt-decode": "^3.1.2", "leaflet": "^1.7.1", "maska": "^1.5.0", "metismenujs": "^1.3.1", "moment": "^2.29.1", "sass": "^1.48.0", "sass-loader": "^10.0.1", "simplebar": "^5.3.6", "simplebar-vue3": "^0.1.5", "sweetalert2": "^11.3.6", "vue": "^3.2.37", "vue-axios": "^3.5.2", "vue-chartist": "^3.0.0", "vue-cropperjs": "^5.0.0", "vue-draggable-next": "^2.1.1", "vue-easy-lightbox": "^1.2.4", "vue-form-wizard": "^0.8.4", "vue-hotel-datepicker": "^4.5.1", "vue-i18n": "^9.2.0-beta.35", "vue-meta": "^2.4.0", "vue-number-input-spinner": "^2.2.0", "vue-router": "^4", "vue-switches": "^2.0.1", "vue3-apexcharts": "^1.4.1", "vue3-carousel": "^0.1.36", "vue3-datepicker": "^0.3.2", "vue3-draggable": "^2.0.9", "vue3-dropzone": "^0.0.7", "vue3-echarts": "^1.0.4", "vue3-google-map": "^0.8.3", "vue3-scroll-spy": "^1.0.8", "vuelidate": "^0.7.7", "vuex": "^4.0.2" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-service": "~4.5.0", "@vue/compiler-sfc": "^3.0.0", "babel-eslint": "^10.1.0", "eslint": "^6.7.2", "eslint-plugin-vue": "^7.0.0" }, "eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/vue3-essential", "eslint:recommended" ], "parserOptions": { "parser": "babel-eslint" }, "rules": {} }, "browserslist": [ "> 1%", "last 2 versions", "not dead" ] }

DataTables autorefresh when new data is added from the google sheets

$
0
0

I used DataTables to display multiple data from my google spreadsheet using app script. Is it possible that when a new data is pasted on the google sheets the data displayed on the html will also update without refreshing the whole page? Also, the color of the new data will be "red". Is it possible? :< I'm new to coding.

Here's my html code:

<h3><b style="color:teal;text-transform:uppercase">Rooniverse</b></h3> <table id="data-table1" class="table table-striped table-sm table-hover table-bordered" ></table> <br>

Here's my javascript code:

google.script.run.withSuccessHandler(showData1).getData1(); function showData1(dataArray){ $(document).ready(function(){ $('#data-table1').DataTable({ data: dataArray, columns: [ {"title":"Name"}, {"title":"Date"}, {"title":"Email Address"}, {"title":"ID"}, {"title":"Ownership Group / Brands"}, {"title":"Approved/Rejected"}, {"title":"Rejected Reason"}, {"title":"Additional Notes"}, {"title":"Segment"}, {"title":"SMB"}, {"title":"MM"}, {"title":"KAM"}, {"title":"DOG"} ] }); }); }

And here's the code for my Code.gs:

```
function getData(){
var spreadSheetId = "my-spreadsheet-id"; //CHANGE
var dataRange = "Homepage!A2:N"; //CHANGE

var range = Sheets.Spreadsheets.Values.get(spreadSheetId,dataRange);
var values = range.values;

return values;
} ```

Error on dataTables

$
0
0

I'm having this error on my html table :<

"DataTables warning: table id=data-table2 - Requested unknown parameter '0' for row 0, column 0. For more information about this error, please see http://datatables.net/tn/4"

Here's my html code, javascript and my code on code.gs.

I created a website using google app script and the data being display on my html table came from my google sheet.

<div class="containerzxc"> <h3><b style="color:teal;text-transform:uppercase">Rooniverse</b></h3> <table id="data-table1" class="table table-striped table-sm table-hover table-bordered" ></table> <br> </div>

Javascript code:

```
google.script.run.withSuccessHandler(showData1).getData1();

function showData1(dataArray){
$(document).ready(function(){
$('#data-table1').DataTable({
data: dataArray,
columns: [
{"title":"Name"},
{"title":"Date"},
{"title":"Email Address"},
{"title":"ID"},
{"title":"Ownership Group / Brands"},
{"title":"Approved/Rejected"},
{"title":"Rejected Reason"},
{"title":"Additional Notes"},
{"title":"Segment"},
{"title":"SMB"},
{"title":"MM"},
{"title":"KAM"},
{"title":"DOG"}
]
});
});
} ```

Code.gs:

``` //GET DATA FROM GOOGLE SHEET AND RETURN AS AN ARRAY
function getData(){
var spreadSheetId = "1mHdXoizZYhskhH-8wJhf7ZjrsTNC3oxXTYdnxbntBoY"; //CHANGE
var dataRange = "Homepage!A2:D"; //CHANGE

var range = Sheets.Spreadsheets.Values.get(spreadSheetId,dataRange);
var values = range.values;

return values;
} ```

Please help as I've been searching for a solution for it :< Also, is it possible when a data is pasted on the google sheet the html table will update automatically without refreshing the whole page and is it also possible that the background for the new data will change to "red" so I can easily see that there's a new data pasted on the google sheets.

Thank you so much! :'<

stateSave problem in google chrome

Hi, I have a parent and Child Table. Is i am able to Export(Excel) both Tables in Single Button

$
0
0

Hi, I have a parent and Child Table. Is i am able to Export(Excel) both Tables in Single Button

cascadingLists - Uncaught Unknown field name

$
0
0

Hello,
I am trying to apply this example to my needs.
I have 3 tables:
1. bibliotheque_editeurs, containing: editeur_id, editeur
2. bibliotheque_collections, containing: collection_id, collection, editeur
3. bibliotheque_oeuvres, containing: oeuvre_id, oeuvre , editeur, collection (with collection dropdown dependend from the editeur one)

As per the example, I added the following to my js file:

  editor.dependent( 'bibliotheque_oeuvres.editeur', 'php/table.bibliotheque_collections.php' );

but I am getting the following message:
"Uncaught Unknown field name - bibliotheque_collections.editeur"
the equivalent in the example would be:
"Uncaught Unknown field name - country.continent"

I don't understand because I don't find such reference in the example.
Additionally, my php file seeems correct, with both leftjoin. (at least it works fine without the "editor.dependent" reference)

Editor::inst( $db, 'bibliotheque_oeuvres', 'oeuvre_id' )
    ->fields(
        Field::inst( 'bibliotheque_oeuvres.oeuvre_id' ),
        Field::inst( 'bibliotheque_oeuvres.editeur' )
            ->options( Options::inst()
                ->table( 'bibliotheque_editeurs' )
                ->value( 'editeur_id' )
                ->label( 'editeur' ))
            ->setFormatter( Format::ifEmpty( null ) )
            ->validator( Validate::dbValues() ),
        Field::inst( 'bibliotheque_oeuvres.collection' )
            ->options( Options::inst()
                ->table( 'bibliotheque_collections' )
                ->value( 'collection_id' )
                ->label( 'collection' ))
            ->setFormatter( Format::ifEmpty( null ) )
            ->validator( Validate::dbValues() ),
    Field::inst( 'bibliotheque_editeurs.editeur' ),
    Field::inst( 'bibliotheque_collections.collection' )
    )
    ->leftJoin( 'bibliotheque_editeurs', 'bibliotheque_editeurs.editeur_id', '=', 'bibliotheque_oeuvres.editeur' )
    ->leftJoin( 'bibliotheque_collections', 'bibliotheque_collections.collection_id', '=', 'bibliotheque_oeuvres.collection' )
    ->process( $_POST )
    ->json();

In the example, we are calling '../php/countries.php', which I don't have access to.
the equivalent in my case is 'table.bibliotheque_collections.php':

Editor::inst( $db, 'bibliotheque_collections', 'collection_id' )
    ->fields(
        Field::inst( 'bibliotheque_collections.collection' ),
        Field::inst( 'bibliotheque_collections.editeur' )
            ->options( Options::inst()
                ->table( 'bibliotheque_editeurs' )
                ->value( 'editeur_id' )
                ->label( 'editeur' )
            )
            ->validator( Validate::dbValues() ),
        Field::inst( 'bibliotheque_editeurs.editeur' )
    )
    ->leftJoin( 'bibliotheque_editeurs', 'bibliotheque_editeurs.editeur_id', '=', 'bibliotheque_collections.editeur' )
    ->process( $_POST )
    ->json();

Any any of what I am missing?

How to activate a search pane filter programmatically

$
0
0

Hello everybody,

I am trying to access and enable a specific filter of a search pane dynamically.
My search panes are located inside a button.
I did not find any solution on this topic.

Thank you for your support

How do you allow carriage returns in a field in table view?

$
0
0

We have a couple columns like a question column. The full text might be up to 150 characters. We want to display the full text but set the column display with max so that it displays a maximum of 60 chars then a carriage return and next if that much.

With the default js and styling we have this doesn't work. data.length as well. In tale view it does not allow text to run to the next line. data.length serves another purpose.

{
targets: 3,
render: function(data, type, row) {
return type === "display" && data.length > 60 ?
data.substr(0, 60) + "…" :
data;
},
},

Question column displays on one line so am currently using data.length:

How do we display the full text but set the column display with max so that it displays a maximum of 60 chars then a carriage return and next if that much

We want:

How do we display the full text but set the column display
with max so that it displays a maximum of 60 chars then
a carriage return and next if that much


Primary key doesn't work on Node.js

$
0
0

I set editor object as below

let editor = new Editor( db, 'CLIENT_MASTER', 'CLIENT_MASTER_ID')

CLIENT_MASTER is table
CLIENT_MASTER_ID is primary key of above table

then submitted data as below
{
data: [
{
CLIENT_MASTER_ID: '7',
COMPANY_NAME: 'ttttt',
ABN: 'ttttt',
CONTACT_PERSON: 'ttttt',
ADDRESS: 'ttttt',
POSTAL_ADDRESS: 'ttttt',
PHONE: 'ttttt',
FAX: 'ttttt',
EMAIL_ADDRESS: 'ttttt',
CREATED_AT: '2023-02-26T14:10:11.000Z',
UPDATED_AT: '2023-02-26T14:10:11.000Z'
}
],
action: 'remove'
}

but built query as below
delete from CLIENT_MASTER where (CLIENT_MASTER_ID = ?)

As shown as primary key value is 7
but it is not applied built query

The word "edit" appears below my table

$
0
0

First time user - presumably, brand new & beautiful version of sftw. Everything great except even after unchecking ALL of the boxes - I JUST WANT TO display 2 images side-by-side - involving user editing, I still get that word & "functionality." Looks like a silly bug to me - Why would that be the default?? Any easy way to get rid of it???

Test

Invalid Json response

$
0
0

Hello this my js script

$(document).ready(function(){   
    
    var sociData = $('#soci_table').DataTable({
        "searching": false,
        //"lengthChange": false,
        "processing":true,
        "serverSide":true,
        "order":[],
        "ajax":{
            url:"action.php",
            type:"POST",
            data: function ( d ) {
                return $.extend( {}, d, {
                    "nome": $("#nome").val().toLowerCase(),
                    "cognome": $("#cognome").val().toLowerCase(),
                    "registrato": $("#registrato").val().toLowerCase(),
                    "certificato": $("#certificato").val().toLowerCase(),
                    "iscrizione": $("#iscrizione").val().toLowerCase(),
                    "action":'mostra'
                } );
            },
            dataType:"json"
        },
        "columnDefs":[
            {
                "targets":[6],
                "orderable":false,
            },
        ],
        "pageLength": 10
    }); 
        
});

So the php script seems ok but the json respone before the correct draw has this

Array
(
    [draw] => 1
    [columns] => Array
        (
            [0] => Array
                (
                    [data] => 0
                    [name] => 
                    [searchable] => true
                    [orderable] => true
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

            [1] => Array
                (
                    [data] => 1
                    [name] => 
                    [searchable] => true
                    [orderable] => true
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

            [2] => Array
                (
                    [data] => 2
                    [name] => 
                    [searchable] => true
                    [orderable] => true
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

            [3] => Array
                (
                    [data] => 3
                    [name] => 
                    [searchable] => true
                    [orderable] => true
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

            [4] => Array
                (
                    [data] => 4
                    [name] => 
                    [searchable] => true
                    [orderable] => true
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

            [5] => Array
                (
                    [data] => 5
                    [name] => 
                    [searchable] => true
                    [orderable] => true
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

            [6] => Array
                (
                    [data] => 6
                    [name] => 
                    [searchable] => true
                    [orderable] => false
                    [search] => Array
                        (
                            [value] => 
                            [regex] => false
                        )

                )

        )

    [start] => 0
    [length] => 10
    [search] => Array
        (
            [value] => 
            [regex] => false
        )

    [nome] => 
    [cognome] => 
    [registrato] => tutti
    [certificato] => tutti
    [iscrizione] => tutti
    [action] => mostra
)

Responsive together with pageResize

$
0
0

Hey, i have a general question regarding the use of pageResize with responsive (hiding columns and showing the green + instead).
If I open the details of one row, the pageResize script (https://github.com/DataTables/Plugins/blob/master/features/pageResize/dataTables.pageResize.js) does not adapt the row count - and then, a vertical scroll bar appears again. It disappears as soon as i close the row details again.
My goal is that opening the responsive-detail-view reduces the numbers of rows on the screen as needed to avoid displaying a scroll bar.
Here is what i tried - didnt work :(

table.on( 'responsive-display', function ( e, datatable, row, showHide, update ) {
            var api = new DataTable.Api(settings);
            if ($(api.table().node()).hasClass('pageResize') ||
                settings.oInit.pageResize ||
                DataTable.defaults.pageResize) {
                new PageResize(api, settings.oInit.pageResizeManualDelta);
            }
    });

Can you point me in the right direction? Which resize function can i call in the event?
Here is a demo: https://live.datatables.net/qagufiti/4/edit
Thanks :)

Performance when exporting pdf or excel in edge

$
0
0

Hello good morning, the library will have problems when exporting pdf or excel in the microsoft edge browser because it takes too long even if there are few records, in google chrome it loads normally but in edge it takes longer than usual.

destroy(false) still removes table

$
0
0

With version 1.13.1 this code:

relatedTable.clear().destroy(false);

Does seem to delete all the table dom.

I say seems as this is a Laravel Livewire app which does change the dom a lot.

I'm updating some values in the table which Livewire does but removes the Datatables functionality from it so I needed to reinitialise.

If I cache the table dom before I clear().destroy() then reinsert it and reinit the table it seems to work. For example:

    var cache = false;

    if ($.fn.dataTable.isDataTable('#RelatedProjectTable'))
    {
        cache = $('#TableWrapper').html();
        relatedTable.clear().destroy(false);
    }

    setTimeout(function(){
        if (cache)
        {
            $('#TableWrapper').html(cache);
        }
        
        relatedTable = $('#RelatedProjectTable').DataTable(conf);
    }, 1000);

upload (many) & deleting

$
0
0

Link to test case:
https://editor.datatables.net/examples/advanced/upload-many.html

I use Editor 2.0.7.

Debugger code (debug.datatables.net):

Error messages shown:

Description of problem:
I have craeato of the tables like in the example https://editor.datatables.net/examples/advanced/upload-many.html, for the upload all well. It works perfectly. If I delete the files, however, is not deleted the file in the server.... and is not deleted the line in the database in the table "files".

I tried to put some parameters "ON DELETE CASCADE" between the tables "files" and "users_files", but I have other problems (upload generates an error).

I tried to use the "dbClean" function, not present in the official example, but nothing changes.

I can't figure out how the file deletion works, and I'm stuck. Any idea?


Nel mio software, le tabelle hanno dei nomi diversi. Vi mando il mio codice, se questo possa essere di aiuto....

                    ...
                    ->join(
                        Mjoin::inst( 'machines_data' )
                            ->link( 'machines.machines_id', 'machines_data_item.machines_id' )
                            ->link( 'machines_data.machines_data_id', 'machines_data_item.machines_data_id' )
                            ->fields(
                                Field::inst( 'machines_data_id' )
                                    ->upload( Upload::inst( $_SERVER['DOCUMENT_ROOT'] .'/admin/data/machines/__ID__.__EXTN__' )
                                        ->db( 'machines_data', 'machines_data_id', array(
                                            'file'        => Upload::DB_FILE_NAME,
                                            'filesize'    => Upload::DB_FILE_SIZE,
                                            'web_path'    => Upload::DB_WEB_PATH,
                                            'system_path' => Upload::DB_SYSTEM_PATH
                                        ))
                                        ->dbClean( function ($data) {

                                            // Remove the files from the file system
                                            for ( $i=0, $ien=count($data) ; $i<$ien ; $i++ ) {
                                                unlink( $data[$i]['system_path'] );
                                            }

                                            // Have Editor remove the rows from the database
                                            return true;
                                        })
                                        ->validator( Validate::fileSize( 5000000, 'Files must be smaller that 5Mb' ) )
                                        ->validator( Validate::fileExtensions( array( 'png', 'jpg', 'jpeg', 'gif', 'pdf', 'zip' ), "Please upload a png, jpg, jpeg, gir, pdf or zip" ) )
                                    )
                            )
                    )
                    ...


                            ...
                            fields: [ {
                                    label: "ID TEST:",
                                    name: "machines_story.machines_story_id",
                                    type:  "hidden"
                                },{
                                    label: "Notes:",
                                    name: "machines_story.machines_id",
                                    type:  "hidden",
                                    def: rowData.machines.machines_id
                                },{
                                    label: "Start Time:",
                                    name: "machines_story.time_start",
                                    type:      'datetime',
                                    def:   function () { return null },
                                    format: 'DD-MM-YYYY h:mm',
                                    fieldInfo: 'Euro style date with 24 hour clock',
                                    opts: {
                                        minutesAvailable: [ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 ]
                                    }
                                },{
                                    label: "Stop Time:",
                                    name: "machines_story.time_stop",
                                    type:      'datetime',
                                    def:   function () { return new Date(); },
                                    format: 'DD-MM-YYYY h:mm',
                                    fieldInfo: 'Euro style date with 24 hour clock',
                                    opts: {
                                        minutesAvailable: [ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 ]
                                    }
                                },{
                                    label: "Text:",
                                    name: "machines_story.text",
                                    type: "ckeditorClassic"
                                },
                                {
                                    label: "Files",
                                    name: "machines_story_data[].machines_story_data_id",
                                    type: "uploadMany",
                                    display: function ( file_id ) {

                                                var filename = childEditor2.file( 'machines_story_data', file_id ).file;
                                                var extention = filename.split('.').pop();

                                                if("pdf" == extention) 
                                                        return '<img src="dist/img/pdf.png"/> ' + filename;
                                                if("zip" == extention) 
                                                        return '<img src="dist/img/zip.png"/> ' + filename;

                                                return '<img src="' + childEditor2.file( 'machines_story_data', file_id ).web_path + '"/> ' + filename;

                                            },
                                    clearText: "Clear",
                                    noImageText: 'No Data'
                                }
                            ]
                            ...

    { title: 'Files',       "data": "machines_story_data",      "width": '50px',
                              render: function ( data, type, row ) {
                                var stringa = "";
                                data.forEach(function (item, index){

                                    var value =item['machines_story_data_id'];

                                    stringa += '<a href="dist/dl.php?t=story&f=' + childTable2.file( 'machines_story_data', value ).web_path.split('/').pop() + '&c=' + "<?=$csrf?>" + '&n=' + childTable2.file( 'machines_story_data', value ).file + '" target="_blank">';

                                    var extention = childTable2.file( 'machines_story_data', value ).file.split('.').pop();
                                    if("pdf" == extention){
                                        stringa += '<i class="fas fa-file-pdf"></i>';
                                    }
                                    else if("zip" == extention){
                                        stringa += '<i class="fas fa-file-archive"></i>';
                                    } else {
                                        stringa += '<i class="fas fa-file-image"></i>';
                                    }
                                    stringa += ' </a>';

                                });

                                return stringa;
                              }
                            }
                            ...

"data" in "rowCallback" option is HTML encoded.

$
0
0

Referring to https://datatables.net/reference/option/rowCallback

$('#example').dataTable( {
  "rowCallback": function( row, data ) {
    console.log(data.test); // will print out "2 &gt; 1" instead of the original "2 > 1"
  }
} );

It seems that the properties/columns in data are HTML encoded. Is there any way to obtain it in its original unedited form?

refresh var inside ajax data

$
0
0

Hello, I am using datatable together with ajax and jquery, in a php environment, I present the case

When loading the content I load a var of value o and the ajax call of dataable, at this point it is correct

this code

        var idReg=0;
    
    var tableReg = $('#ListRegistro').DataTable( 
        
           {    
    
               "ajax": {
               "url": UrlBase+"?type=4",
               "contentType": "application/json",
               "type": "GET",
           "data": {idServicio:idReg},
                "success": function ( d ) {
      return JSON.stringify( d );
          }
      }
     } );

Additionally, I have a function that changes the value of idReg, and it changes it correctly, but if I do an ajax.refresh, the data table request has not updated that variable...how can I update it or create that dynamic var?

thank you

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

SearchBuilder Dropdown Results Sorting

$
0
0

In this test case, when I select Add Condition -> Name -> Equals, how can I display the drop down results in alphabetical order so that it is: 0 N, 12 N, 1 P, 5 P, 7 P, 8 P

How to remove sort link from one table column header

$
0
0

I have a table with 5 data columns that I wish to sort on and one 'links' column ( Details, Edit , Delete) that I don't want the sort option to appear on. I have tried using the TH hidden attribute, but this messed up the data alignment in the rows, so they didnt align with their respective headers. Is there a way to make this work ?Thanks in advance

Viewing all 82628 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>