This is a migrated thread and some comments may be shown as answers.
item request event not firing
1 Answer 16 Views
This is a migrated thread and some comments may be shown as answers.
Anju
Top achievements
Rank 1
Anju asked on 06 May 2013, 05:31 AM
I have a combobox that placed inside a radwindow. Item request event of the combobox not working.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 06 May 2013, 06:32 AM
Hi Anju,

The ItemsRequested event occurs when the EnabledLoadOnDemand property is True and the user types text into the input field or clicks on the drop-down toggle image when the list is empty. Check whether you have enabled the LoadOnDemand property of the RadComboBox. Please have a look at the following sample code I tried which works fine at my end.

ASPX:
<telerik:RadWindow ID="RadWindow1" runat="server">
    <ContentTemplate>
        <telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="true" OnItemsRequested="RadComboBox1_ItemsRequested"
            Style="margin: 20px 20px 20px 20px;">
        </telerik:RadComboBox>
    </ContentTemplate>
</telerik:RadWindow>
<telerik:RadButton ID="RadButton" runat="server" Text="Open RadWindow" OnClientClicked="OnClientClicked"
    AutoPostBack="false">
</telerik:RadButton>

C#:
protected void RadComboBox1_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
    RadComboBox1.Items.Add(new RadComboBoxItem("Item1", "1"));
    RadComboBox1.Items.Add(new RadComboBoxItem("Item2", "2"));
    RadComboBox1.Items.Add(new RadComboBoxItem("Item3", "3"));
}

JavaScript:
<script type="text/javascript">
    function OnClientClicked(sender, args) {
        var radWindow1 = $find("<%= RadWindow1.ClientID %>");
        radWindow1.show();
    }
</script>

Thanks,
Princy.
Asked by
Anju
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or