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

Click on combobox and load record

3 Answers 40 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 30 Nov 2012, 09:11 AM
hi,
I would like that even after selecting an item, when I click on radcombobox I appeared throughout the item list also .. but after setting the filter property in StartsWith, every time I load I want to change the selected item, I must first delete the selected item so that I can look through the list .... There is a procedure that ancestral delete the selected item but also to view the entire list of items loaded into radcombo?

my code is:
<telerik:RadComboBox ID="Regione" Runat="server" CollapseDelay="100"
EnableLoadOnDemand="True" HighlightTemplatedItems="True" IsCaseSensitive="True"
LoadingMessage="Loading..." DropDownWidth="160px" Filter="StartsWith" Width="160px"
MaxHeight="175px" ShowMoreResultsBox="True" Height="175px" OnClientItemsRequesting="OnClientItemsRequesting"
AutoPostBack="True" OnSelectedIndexChanged="Regione_SelectedIndexChanged" OnClientItemsRequested="OnClientItemsRequested"
EmptyMessage="Select region" Skin="Sunset">
</telerik:RadComboBox>

3 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 05 Dec 2012, 06:56 AM
Hi,

In order to achieve the desired functionality, the OnClientDropDownOpening client-side event should be handled and the following implementation of the event handler function could be used:
function OnClientDropDownOpening(sender, eventArgs) {
    if (sender.get_selectedItem()) {
        sender.set_text("");
    }                   
}

With the above implementation when the drop down is opening and there is already a selected item, the text of the RadComboBox will be cleared thus causing a new request for items to be made.

All the best,
Dimitar Terziev
the Telerik team
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 their blog feed now.
0
Fabio Cirillo
Top achievements
Rank 1
answered on 06 Dec 2012, 11:06 AM

ok but I would like to open my radcombobox, the text remains, but appears in the list with all the items according to the initial property startwith then starting from the selected item, and pointing out all those who follow.

my code is

<telerik:RadComboBox ID="Categoria" Runat="server" CollapseDelay="100" OnClientItemsRequesting="OnClientItemsRequesting"
    DropDownWidth="350px" EnableLoadOnDemand="True" Filter="StartsWith" OnClientItemsRequested="OnClientItemsRequested"
    HighlightTemplatedItems="True" IsCaseSensitive="True"
    LoadingMessage="Caricamento..." MaxHeight="175px"
    ShowMoreResultsBox="True"
     Width="350px" Height="175px">
</telerik:RadComboBox>

0
Dimitar Terziev
Telerik team
answered on 28 Dec 2012, 10:08 AM
Hi,

In order to show all records and not only the filtered results upon drop down opening, a request with empty text should be performed.

Kind regards,
Dimitar Terziev
the Telerik team
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 their blog feed now.
Tags
ComboBox
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Fabio Cirillo
Top achievements
Rank 1
Share this question
or