GithubHelp home page GithubHelp logo

DataTables warning (table id = 'my-data-table'): Requested unknown parameter '0' from the data source for row 0 about angular-datatable HOT 3 CLOSED

ferenckun avatar ferenckun commented on July 17, 2024
DataTables warning (table id = 'my-data-table'): Requested unknown parameter '0' from the data source for row 0

from angular-datatable.

Comments (3)

FerencKun avatar FerencKun commented on July 17, 2024

Hi jaybe78,

I checked the original example from github and without any change it worked.
Did you tried it to add to your code? 

The most common problem with that is that you forget to rename the module in the datable.
angular.module('angularTableApp')
    .directive('myDataTable', function ($parse) {
angularTableApp is the main module name you use.

If something another thing is what went wrong by you please give me more details about your usage.

Regards,
Ferenc

-- 
Private
Sent with Airmail

On 25 Mar 2014 at 01:22:37, jaybe78 ([email protected]) wrote:

Hello,

I've tried to run your example, but it doesn't work. I always the same issue when displaying the table
DataTables warning (table id = 'my-data-table'): Requested unknown parameter '0' from the data source for row 0.

I've googled around and I found that issue can be caused by several things...

Any ideas?


Reply to this email directly or view it on GitHub.

from angular-datatable.

jaybe78 avatar jaybe78 commented on July 17, 2024

Actually, I haven't really run your code... I've included js and css files and into my own project.
I didn't forget to replace 'angularTableApp' by the name of my module name.
I think I should try to run your project first and then include my own js files into it.
I'm gonna investigate and hopefully find the issue

EDIT:
I've managed to run your project with grunt but only on google chrome, it fails on firefox 28.0
"Error: event is not defined
prepareRows@http://localhost:9000/scripts/directives/dataTable.js:388
drawTable@http://localhost:9000/scripts/directives/dataTable.js:458
setWatchOnTheSource/<@http://localhost:9000/scripts/directives/dataTable.js:543
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:9000/bower_components/angular/angular.js:8097
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:9000/bower_components/angular/angular.js:8304
done@http://localhost:9000/bower_components/angular/angular.js:9357
completeRequest@http://localhost:9000/bower_components/angular/angular.js:9520
createHttpBackend/</xhr.onreadystatechange@http://localhost:9000/bower_components/angular/angular.js:9491
"

Also I have a question regarding:
id="my-data-table"
id="customHeader"

These ids are hardcoded in your directive but let's say I have several datatable in the same page...
I guess that wouldn't work?

What do you think of the ng-grid?
http://angular-ui.github.io/ng-grid/

from angular-datatable.

FerencKun avatar FerencKun commented on July 17, 2024

You're right. In my example I used only one table per page. That's why I used ids instead of classes. But you can use classes aka. more tables per page as well. Just be careful and find all the jQuery selectors I used in the code and use class selectors instead of id selectors.

from angular-datatable.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.