Error while generating NumberField dinamically: 'Uncaught TypeError: Cannot set property 'unselectable' of null'

  1. #1

    Error while generating NumberField dinamically: 'Uncaught TypeError: Cannot set property 'unselectable' of null'

    Hi there! This is my first thread on the forum. Let's see if I can explain myself well enough.

    I am trying to dinamically create a form on server side using an user control. When I try to add this user control to a container and I perform an updateContent to diplay it, I do occasionally get the following error message:

    Click image for larger version. 

Name:	MicrosoftTeams-image.png 
Views:	25 
Size:	21.8 KB 
ID:	25505

    Any ideas what may be causing the error?
  2. #2
    Hello @dhpatrebo, and welcome to Ext.NET forums!

    While we are at the welcome part, I'd suggest you to take some time to read thru our forum posting guidelines, as boring as it may sound, it is going to save you precious time in the long run, so that's totally worth your time:

    - Tips for creating simplified code samples
    - More Information Required
    - Forum Guidelines

    Basically it will help you organize yourself to work on issues you face by simplified test cases you can copy-paste here, we then can copy-paste in a test project and see exactly what you see -- and ultimately provide you with pinpoint information on how to deal with whatever scenario you're facing.

    Examples explorer is also your friend, you can even download (git clone) the full project, build it locally and use it as your very test bed for features or test cases!

    That said, I've already read thru your question and you said you want to call updateContent() in the panel, somehow... May this be the case that you are holding Ext.NET components within ASP.NET Update Panels? If that's the case, if you search forums (in google, site:forums.ext.net updatepanel), you are going to see several questions regarding it, especially between Ext.NET versions 1 and 2 (so, really old threads), and what's to find there, is that this ASP component doesn't really mingle very well with Ext.NET.

    There are some design constraints between the ASP.NET update panel, its life cycle, and our underlying framework, Sencha Ext JS, that are, albeit we tried hard, not able to interact at all. In fact, Ext.NET has its own implementation (loaders, data refresh) that nicely handles all cases an update panel would do.

    Other than that, I am afraid I don't have much clue on what you're facing there. But basically you are breaking the inherent page life cycle in whatever you are trying. In general, Ext.NET needs room to run scripts to build its components into view, so in general adding content is something that won't work with all its capabilities of seamlessly mingling with existing components on the page as well as wiring up events and handles for those components to interact with the page.

    So, if you are using the UpdatePanel, you should try something else, using actual Ext.NET panels or containers and have Ext.NET do its job with layout and client-side component logic on the page. If there are something else involved here, it is not clear what it is. I believe this would be a case a test case would fit great for us to get in what grounds you are at.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 0
    Last Post: Dec 21, 2017, 11:51 AM
  2. Replies: 1
    Last Post: Dec 15, 2015, 2:18 PM
  3. Replies: 2
    Last Post: Aug 13, 2014, 3:01 AM
  4. [CLOSED] Uncaught TypeError: Cannot read property 'items' of null
    By tobros in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Nov 20, 2013, 11:45 AM
  5. Uncaught TypeError: Cannot read property 'items' of null
    By FlavioSilveira in forum 2.x Help
    Replies: 6
    Last Post: Sep 20, 2013, 7:37 PM

Posting Permissions