1

Problem context:

1) rcbComboBoxInRadPanel is a Telerik RadComboBox.
2) rcbComboBoxInRadPanel has "OnClientSelectedIndexChange" event which fires "itemSelected."
3) rcbComboBoxInRadPanel is contained a radAjaxPanel called "foo."
4) strSomeOtherRadAjaxPanel names a RadAjaxPanel that exists outside of "foo."
5) $find(strSomeOtherRadAjaxPanel) returns a valid RadAjaxPanel if executed alone.

function itemSelected(rcbComboBoxInRadPanel) 
{
  var strComboBoxInRadPanel = rcbComboBoxInRadPanel.get_id(); 
  var intRecordID = rcbComboBoxInRadPanel.get_value();
  $find(strSomeOtherRadAjaxPanel).ajaxRequest(intRecordID);                
}

It appears that $find(strSomeOtherRadAjaxPanel) always returns null when called from the "OnClientSelectedIndexChange" event of rcbComboBoxInRadPanel.

Is there another way for me obtain a valid reference to the RadAjaxPanel using $find(strSomeOtherRadAjaxPanel)?

Any help you can offer would be helpful.

Dick Lampard
  • 2,256
  • 1
  • 12
  • 7
Michael Rosario
  • 838
  • 1
  • 11
  • 26

2 Answers2

0

check your rendered html source code. ASP dynamically generates clientID names so your server side IDs may not have persisted. They probably now look something like ctl100aFMLksdjflFML

Either target them some other way (like class name, jQuery search, etc) or set the client ID mode to static (if it is the only instance of this object) then try again.

Sinaesthetic
  • 11,426
  • 28
  • 107
  • 176
0

Can you obtain reference to the strSomeOtherAjaxPanel from other client handler of the combo or when it is moved outside of its ajax panel holder? If the strSomeOtherAjaxPanel is initialized properly on the client, it should be available in each of these cases.

Dick Lampard
  • 2,256
  • 1
  • 12
  • 7