Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82036

uncaught exception: Unable to automatically determine field from source.

$
0
0

Hopefully this will be a quick fix... hopefully

Full error I'm getting: "uncaught exception: Unable to automatically determine field from source. Please specify the field name"

I have a datatable with a field showing the concatenation of three fields, using the following:

   var table = $('#example').DataTable( {
      dom: "Bfrtip",
      ajax: "../server_side/scripts/ET_ASBresultsForBuilding.php?jobRef=P18-00053",
      iDisplayLength: 25,
      columns: [
         { data: null, render: function ( data, type, row ) {
                return data.tblASBassets.roomLocation;
            } },
         { data: null, render: function ( data, type, row ) {
                return data.tblASBassets.area + ', ' +data.tblASBassets.item + ', ' + data.tblASBassets.material;
            }, editField: null },

on the editor I've listed the three fields:

   editor = new $.fn.dataTable.Editor( {
      ajax: "../server_side/scripts/ET_ASBresultsForBuilding.php?jobRef=P18-00053",
      table: "#example",
      fields: [ { name: "tblASBassets.roomLocation", type: "display" },
                { name: "tblASBassets.area", type: "display" }, 
                { name: "tblASBassets.item", type: "display" }, 
                { name: "tblASBassets.material", type: "display" },

When I click on the datatable's field

I get the following

I know it's something to do with the editor trying to find the corresponding Editor Field - but because it's three fields in 1 I get the exception error.... all I want to do really is say - just show this at text - I don't want to edit it.

Anyone got any ideas? As ypou ca see I even tried setting the editfield parameter to null with no effect

Thank you in advance for any help given


Viewing all articles
Browse latest Browse all 82036

Trending Articles



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