Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: column.get(...) is not a function #5

Closed
Gardezi1 opened this issue Feb 22, 2016 · 2 comments
Closed

Uncaught TypeError: column.get(...) is not a function #5

Gardezi1 opened this issue Feb 22, 2016 · 2 comments

Comments

@Gardezi1
Copy link

hello I am trying to create the a table which has columns with child columns. I am doing it like this

var grid2 = new Backgrid.Grid({
  columns: [ {
    name: "name",
    label: ""
  },{
    name: "Hours",
    label: "Hours",
     children:[
       {
         name:"",
         label: "0",
         cell: "select-row",
       },
       {
         name:"",
         label: "1",
         cell: "select-row",
       },
       {
         name:"",
         label: "2",
         cell: "select-row",
       },
       {
         name:"",
         label: "3",
         cell: "select-row",
       }
   ]

  }],

  collection: new Backbone.Collection([
    {"name": "Monday"},
    {"name": "Tuesday"},
    {"name": "Wednesday"},
    {"name": "Thursday"},
    {"name": "Friday"},
    {"name": "Saturday"},
    {"name": "Sunday"}
  ])
});

$("#dayResults").append(grid2.render().el);

but I am getting this error

Uncaught TypeError: column.get(...) is not a function

my file path are like this.

    <script src="https://cdn.rawgit.com/jashkenas/underscore/1.5.2/underscore.js"></script>
    <script src="https://cdn.rawgit.com/jashkenas/backbone/1.1.0/backbone.js"></script>
    <script src="https://cdn.rawgit.com/wyuenho/backbone-pageable/master/lib/backbone-pageable.js"></script>
    <!--<script src="assets/plugins/backgrid-selectall/js/ext-all.js" ></script>-->
    <!--<script src="assets/plugins/backgrid-selectall/js/backgrid-select-all.js" ></script>-->

    <script src="https://cdn.rawgit.com/wyuenho/backgrid/master/lib/backgrid.js"></script>

    <script src="assets/plugins/backgrid-selectall/js/backgrid-select-all.js" ></script>
    <script src="assets/js/backbone.paginator.js"></script>
    <script src="assets/js/backgrid-paginator.js"></script>
    <script src="https://cdn.rawgit.com/wyuenho/backgrid-filter/master/backgrid-filter.js"></script>

    <script src="assets/js/backgrid-grouped-columns.js" ></script>
@pesikar
Copy link
Contributor

pesikar commented Mar 16, 2016

You will also have to add the backgrid-patch.js from this repository to your js includes. Until cloudflarearchive/backgrid#546 has been merged into backgrid.

@excentris
Copy link
Contributor

@Gardezi1 can you confirm your issue is fixed once backgrid-patch.js is included?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants