Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
editorControl is null or not an object
posted

  Normal 0 MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";}

We have a page with 2 infragistics grid, and only one of them is visible at any given time.

Visibility is toggled on button click.

 

  1. Page is loaded with Grid #1 visible and Grid# 2 is not visible
  2. I click on the button, making Grid#2 visible (and making Grid#1 invisible)
  3. Now when I move mouse over the Header of Grid#2, I get javascript error saying ‘editorControl’ is null.

 

I found that moving mouse over Grid#2 header fires function ‘igtbl_headerMouseOver(evnt,gn)’ which in turns fire ‘igtbl_inEditMode(gn)’ and its parameter ‘gn’ is set to igtbl_lastActiveGrid’. and ‘igtbl_lastActiveGrid’ is set to the id of Grid#1.

 

This function ‘igtbl_inEditMode’ contains the line

 

var g = igtbl_getGridById(gn);

 

At this point my Grid#1 is invisible, and so javascript cant find it. So ‘g’ is ‘null’.

 

Now the next line is ‘g.editorControl’. Since ‘g’ is null, I cant get ‘editorControl.’, thereby throwing the error ‘editorControl is null’.

Parents
No Data
Reply
  • 45049
    posted

    As you mentioned in this post, you've already opened up a support request for this issue.

    What property are you using to toggle visibility?  If you're using the "Visible" property, I'd suggest against it.  Instead, set the grid's style to either "display:none" or "display:hidden" so that the grid still exists in the page's HTML, but doesn't display to the user.

Children