This is a migrated thread and some comments may be shown as answers.

Unable to get property 'trackChanges' of undefined or null reference

4 Answers 120 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
thomas
Top achievements
Rank 1
thomas asked on 20 Dec 2016, 01:34 PM

Unable to get property 'trackChanges' of undefined or null reference in IE 9 and above and chrome.   No issues in IE 8.  Using jQuery on page load. 

var resultsDropDowlist = Terlerk.web.UI.RadComboBox.ComboBoxes[2];

resultsDropDownlist.trackChanges();

//To Clear the Selected Item

resultsDropDownList.get_items().clear();

4 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 22 Dec 2016, 07:16 AM
Hello Thomas,

You have two typos: Terlerk.web.UI.RadComboBox.ComboBoxes[2]; Should be Telerik.Web
Note however that you can get a reference to a RadComboBox control this way not to a RadDropDownList. If you want to get the RadDropDownList object, which is different from the RadComboBox one, we recommend doing so as shown in the documentation.


Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
thomas
Top achievements
Rank 1
answered on 03 Jan 2017, 02:45 PM

Thanks for the reply Ivan.

Sorry about the typo but it was correct in code. 

var resultsDropDownList = Telerik.Web.UI.RadComboBox.ComboBoxes[2];

In IE 8 the jquery code will find the RadComboBox but in other versions above and in chrome it will fail.

0
Ivan Danchev
Telerik team
answered on 04 Jan 2017, 04:01 PM
Hello Thomas,

This exception could indicate the ComboBox you are trying to get a reference to is not yet instantiated by the moment you are trying to access it.
I attached a sample runnable page to this reply, which shows that a proper reference is obtained in the page's Load event, in the control's own OnClientLoad client-side event's or in a button's click event. Could you modify it accordingly so that the issue is reproduced and post your modifications for further review?

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
thomas
Top achievements
Rank 1
answered on 17 May 2017, 07:47 PM

The issue was resolved by using

function pageLoad()  vs  $(document).ready(function()

 

 

Tags
DropDownList
Asked by
thomas
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
thomas
Top achievements
Rank 1
Share this question
or