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

Error in callback with Q2 release

1 Answer 78 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Imtiaz
Top achievements
Rank 1
Imtiaz asked on 04 Aug 2008, 10:11 PM
Hi

I installed Q2 7.23 release and now I am getting error in call back, here is the scenario.

1. Search and select 1 item
2. remove item
3. try searching again
 gets "Error in call back" js message

Here is the defination.

<telerik:RadComboBox   
    Id="SearchCombo" 
    Runat="server" 
    EnableLoadOnDemand="True" 
    OnItemsRequested="SearchCombo_ItemsRequested" 
    LoadingMessage="Searching..." 
    EmptyMessage="Search ..." 
    Height="15px" 
    Width="315px" 
    DropDownWidth="400px" 
    Skin="Sunset" 
    OnSelectedIndexChanged="SearchCombo_SelectedIndexChanged" 
    OnClientItemsRequesting="HandleRequestStart" 
    OnClientKeyPressing="HandleKeyPress" 
    BackColor="#E0E0E0" 
    BorderColor="Transparent" 
    CollapseDelay="200" 
    ExpandDelay="300" 
    ItemRequestTimeout="200" 
    ShowDropDownOnTextboxClick="False" 
    ShowWhileLoading="False" 
    AutoPostBack="true" 
    ShowToggleImage="False" 
    ShowMoreResultsBox="True" 
    CausesValidation="False" 
    OnClientItemsRequested="HandleRequestEnd" 
    HighlightTemplatedItems="True">  
    <ItemTemplate> 
        <div  class="AssocSearchItemContainer" > 
            <div style=" float:left;">  
                <img alt='<%# Eval("Title")%>' height="40px" src='<%# Eval("ThumbnailURL")%>' /> 
            </div> 
            <div class="AssocSearchItemTextBlock">  
                <strong><%# Eval("Title")%></strong><br /> 
                <%# Eval("Description")%><br /> 
                <%# Eval("Details")%><br /> 
            </div> 
        </div> 
    </ItemTemplate> 
    <CollapseAnimation Duration="100" Type="OutQuint" /> 
    <ExpandAnimation Type="None" /> 
</telerik:RadComboBox> 


Thanks
Imtiaz

1 Answer, 1 is accepted

Sort by
0
Imtiaz
Top achievements
Rank 1
answered on 04 Aug 2008, 10:32 PM
The soultion is to set comboBox.SelectedValue = ""; 
in ItemsRequested event.

 protected void SearchCombo_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)  
        {  
              
            string searchPhrase = e.Text.Trim();  
            e.EndOfItems = true;  
 
            if (e.NumberOfItems > 0)  
            {  
                // ignore requests for more items  
                return;  
            }  
 
            RadComboBox comboBox = (RadComboBox)sender;  
            comboBox.SelectedValue = ""; 

Thanks
Imtiaz
Tags
ComboBox
Asked by
Imtiaz
Top achievements
Rank 1
Answers by
Imtiaz
Top achievements
Rank 1
Share this question
or