Skip to main content
All docs
V24.2

The 'Microsoft JScript runtime error: 'X' is undefined' error message appears when the Control.Visible property is set to false

Error Description

The “Microsoft JScript runtime error: ‘X’ is undefined” error message appears when you try to access a DevExpress ASP.NET control whose Visible property is set to false.

This error occurs because a control is not rendered on a page if its Visible property is set to false. As a result, you cannot access the control on the client.

Note

If a container control is not rendered, nested controls are not rendered either. The individual nested control returns false for the Visible property even if you have explicitly set it to true.

Solution

Use the ClientVisible property to hide a control on the server and then make it visible on the client.

See Also

The Difference Between the Enabled / Visible and ClientEnabled / ClientVisible Properties