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

RadComboBox OnClientItemDataBound event not firing

1 Answer 110 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 08 Jul 2014, 08:50 PM
Can someone post a complete example of Q2 2011 for making this work .... I have the other events working including OnClientSelectedIndexChanged, OnClientItemsRequesting, OnClientDropDownClosing

My problem is the OnClientItemDataBound event does not seem to be firing ... I have a somewhat 'different' scenario in that the events are wired up in the code behind and the script as well so 

so in the page load

void Page_Load()
{
      if(!this.IsPostBack)
      {
            mycombobox.OnClientItemDataBound = "mycombobox_OnClientItemDataBound"
      }
   
      RegisterScripts();
}


then register scripts looks like
private void RegisterScripts()
{
      StringBuilder sb = new StringBuilder()
      sb.AppendLine("function mycombobox_OnClientItemDataBound(sender, args){console.log(sender);}")
      ScriptManager.RegisterStartupScript(Page, Page.GetType(), "name", sb.ToString(), true);
}

the 'binding code looks like this'
[item generation code]
mycombobox.DataSource = items;
mycombobox.DataBind()





1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Jul 2014, 08:48 AM
Hi Sean,

The OnClientItemDataBound event will occur for each item that is created using webservice LoadOnDemand. Please make sure that you are binding RadComBoBox using webservice. Please take a look into this help documentation for further information.

Thanks,
Princy.
Tags
ComboBox
Asked by
Sean
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or