jQuery UI Widgets › Forums › Grid › Uncaught TypeError: Cannot read property 'visiblerecords' of null
This topic contains 8 replies, has 5 voices, and was last updated by svetoslav_borislavov 1 year, 4 months ago.
-
Author
-
Hi,
I am new to the jQWidgets functionality so learning how to use it. I have a jqxTabs instance composed of a couple of tabs. On the second tab I have placed a jqxGrid instance. When the first tab is the currently visible tab and I try to update one of the column header/title ( in fact the first one ) , I get the following error:
Uncaught TypeError: Cannot read property ‘visiblerecords’ of null
If I am on the second tab i.e. the one upon which the grid exists and is therefore visible and I execute the same sequence to update the title, I get no error message.
In both cases the title of the column is updated. Any ideas anybody ? If I need to provide an example it may take some time for me to do as I have to cut down my working code
Regards.
Hi SAhmed,
Widget methods should be called only when the widget is displayed. In your case, when you are on the first tab, the grid is with
display: none
. Such erroneous behaviour can be expected if calling a method in this situation.Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
Thank you for the answer – it make sense but creates a “problem” for me.
Essentially what I am trying to do is to populate the UI with lots of data from an XML file (significant portion of the data is tabular) in readiness for the user to use as is or carry out whatever changes are necessary prior to other specific analytical actions. The data is “grouped” hence the approach for using tabs. And the user must be able to select the XML file from any current tab. Is there a better approach to populating the grid ?
Regards.
Hi SAhmed,
The grids have to be initialized in the jqxTabs initTabContent callback (demo). Once a grid has been initialized, you can call its methods.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/I have similar problem, can post the demo again?
You may look at the demo provided by my colleague. It is still active and available.
No, when I press the link, the following is shown:
I want to see the code of
the grids have to be initialized in the jqxTabs initTabContent callback (demo). Once a grid has been initialized, you can call its methods.
the link is dead, can post again?
Hi,
You may open the developer tools and see the code in the source tab:
https://pastebin.com/je1i5QKSI hope this helps!
Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.