Grid Issues after using SetOptions

0 Answers 51 Views
Top achievements
Rank 1
Alex asked on 21 Mar 2022, 12:37 PM

I'm formatting a grid using the setOptions method. I'm setting the three following properties:

  • pageSizes
  • pageSize
  • height

I'm doing it by calling the setOptions method from the window.load method, like this:

    groupable: true
    , pageable: {
        pageSizes: selPageSizes,
        pageSize: selDefaultPageSize
    , dataSource: { pageSize: selDefaultPageSize }
    , height: selGridHeight
    height: selGridHeight
    groupable: true

When the grid data is loaded from the beginning, everything works fine, but if the grid is loaded after the page is loaded, I'm getting and error in the console, that I believe is related with the kendo code, not my code. Then, the data is never loaded into the grid, and the format is lost. This is the error that I'm getting:

Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    at Function.grep (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:128089)
    at vh (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:1624055)
    at init._createHeaderCells (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:1745497)
    at init._thead (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:1749404)
    at init._continueInit (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:1637952)
    at init (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:1637851)
    at init.setOptions (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:1643697)
    at HTMLDivElement.<anonymous> (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:17624)
    at Function.each (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:127618)
    at i.fn.init.each (scripts?v=AVz3fyQ7ZO52UNjzde7myJ8QPQ5jc3JcuS7NoqRhdVw1:1:125575)


And this is the pieace of code where the error is happening:



No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question