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

ClientSelectedIndexChanged event for RadCombobox in Listview

1 Answer 11 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 08 Oct 2013, 05:13 PM
I've been trying to attach a ClientSelectedIndexChanged event to add a javascript function on a radCombobox inside a listview 


protected void AdListView1_ItemCreated(object sender, RadListViewItemEventArgs e)
{
        RadComboBox box = (RadComboBox)e.Item.FindControl("ItemTypeCbx");
        box.Attributes.Add("OnClientSelectedIndexChanged", "ItemTypeCbxOnClientSelectedIndexChanged");
 
  }


Then I'd like a javascript event to fire 

function ItemTypeCbxOnClientSelectedIndexChanged(sender, eventArgs) {
         
           
     }
The event doesn't fire and I'm pretty sure I'm probably missing some important step.  Can someone point me in the right 
direction? I've tried to attach that event inside Itemdatabound as well and no luck either.  Thanks 


1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Oct 2013, 11:39 AM
Hi Jeff,

 Note that the client side and server side SelectedIndexChanged events wont fire when the default item is selected (even if the AutoPostBack property is set to true). This is the default nature and these events will fire instantly once an item other than the default item in the RadComboBox is selected.
Please try the same control out of the RadListView and attach its event in the PageLoad server event and verify if it fires correctly.
Also sharing your page markup and full code behind will help us further investigate the issue and do our best to provide proper solution.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ListView
Asked by
Jeff
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or