eisenbraun / columns

A jQuery plugin that converts JSON data into searchable, sortable, HTML tables
http://eisenbraun.github.io/columns
MIT License
104 stars 47 forks source link

Error on: mobilize-tables.js ??? #21

Closed petejordan closed 8 years ago

petejordan commented 8 years ago

Michael loving Columns and working exceedingly nicely. json data there and schema controlling which columns shown nicely. But when query parms are modified and a subsequent ajax issued Columns continues to present the original data so I search for and find $('#Grid').columns('destroy'); thinking aha Eureka ! But when I try to $('#Grid').columns('destroy'); 404 error shown indicating mobilize-tables.js missing ??? I've downloaded the .zip from both Git and your site and have not found the piece I'm missing.

Fiddler says: Detailed Error Information: Module IIS Web Core Notification MapRequestHandler Handler StaticFile Error Code 0x80070002 Requested URL http://localhost:53472/lib/vendor/mobilize-tables.js Physical Path C:\myDir\lib\vendor\mobilize-tables.js Request Tracing Directory C:\Users\myPerson\Documents\IISExpress\TraceLogFiles\MY_DATABASE

What am I doing wrong ?

Also: How to add thousands separators ? to a numeric column ?

Thx for great code. They like it.

petejordan commented 8 years ago

Michael, Ignore all the above. Way wrong. Embarrassing. In F12 (Developer's Tools) error shown: "Uncaught Error: No such method "destroy" for Columns" on line: "$('#FishGrid').columns('destroy');" What am I doing wrong ?

Also: How to add thousands separators ? to a numeric column ? Mustache conditionals ?

Thx for great code. They like it.

petejordan commented 8 years ago

Using jquery-2.2.0.min.js

petejordan commented 8 years ago

Still with me: but in a different form:

 "Uncaught TypeError: Cannot read property 'destroy' of null"

and none of these avoid this error:

//if (typeof document.getElementById('FishGrid') != 'undefined') {

//if (document.getElementById('FishGrid') instanceof Object) {

//if ($("#FishGrid").length) {

//if (!($("#FishGrid") === null)) {

var grid = $("#FishGrid");
if(typeof(grid) !== 'undefined' && grid != null){
    $('#FishGrid').columns('destroy');
}

Signed Frustrated