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

Load on demand of radcombobox

6 Answers 470 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
geetha priya
Top achievements
Rank 1
geetha priya asked on 30 Nov 2010, 11:44 AM
Hi

i am using radcombobox in my page. the load on demand is working fine. 
when i click or place my cursor on the combobox it list out the items. but i want to list my items after typing 2 or 3 letters on the combobox.
how can i do this?

thanks.
geetha.

6 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 30 Nov 2010, 12:23 PM
Hi geetha priya,

Please use the MinFilterLength property of the RadComboBox to set the minimum length of the typed text before a new request for items is initiated.
You can test how this property works at the "Load On Demand" section of this online demo.

Best wishes,
Kalina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Nicolas
Top achievements
Rank 1
answered on 06 Jan 2011, 11:04 PM
Hi,

I think what Geetha was trying to explain, or at least that's the problem i'm experiencing right now, is that, even with the MinFilterLenght set to a value higher than zero, the ItemsRequested event is launch when the combobox is receiving the focus. My case isn't quite difficult, here's my definition of the radcombobox.

<telerik:RadComboBox ID="contractNumber" runat="server" Width="250px" Height="150px"
            EmptyMessage="Search (6 characters min)"
            EnableLoadOnDemand="True"
            EnableItemCaching="true"
            IsCaseSensitive="false"
            MinFilterLength="6"
            OnItemsRequested="ContractNumber_ItemRequested"">
        </telerik:RadComboBox>

How can I make it without raising the ItemsRequested event on focusing? Thanks.

Nic
0
Kalina
Telerik team
answered on 17 Jan 2011, 03:23 PM
Hello Nicolas Ducharme,

Let me suggest you stop the request for items when RadComboBox is focused by handling the OnClientItemsRequesting event in this way:
<script type="text/javascript">
 
    function OnClientItemsRequesting(sender, eventArgs) {
        if (eventArgs.get_text().length < 6)
            eventArgs.set_cancel(true)
        else
            eventArgs.set_cancel(false);
    }
 
</script>

<telerik:RadComboBox ID="contractNumber"
    runat="server" Width="250px"
    Height="150px"
    OnClientItemsRequesting="OnClientItemsRequesting"
    EmptyMessage="Search (6 characters min)"
    EnableLoadOnDemand="True"
    EnableItemCaching="true"
    IsCaseSensitive="false"
    MinFilterLength="6"
    OnItemsRequested="ContractNumber_ItemRequested">
</telerik:RadComboBox>

Regards,
Kalina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 09 Feb 2011, 12:35 PM
Having the exact same problem and would like this to be considered as a bug even if the workaround works, as the MinFilterLenght should make sure this don't happen, or it doesn't work, right?
0
Kalina
Telerik team
answered on 09 Feb 2011, 12:42 PM
Hello Patrik Johansson,

This issue has been already logged for fixing.
Meanwhile please use the workaround provided here.

All the best,
Kalina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 09 Feb 2011, 12:43 PM
Great, thanks for quick respons and fixing this.
Tags
ComboBox
Asked by
geetha priya
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Nicolas
Top achievements
Rank 1
improwise
Top achievements
Rank 1
Iron
Iron
Share this question
or