RadCombobox's OnItemRequested event only trigger when more than 5 text characters have been entered.

3 posts, 0 answers
  1. Jack
    Jack avatar
    3 posts
    Member since:
    Dec 2012

    Posted 18 Feb 2013 Link to this post

    I have a RadCombobox inside a RadGrid and I want the RadCombobox's OnItemsRequested event to fire only when the user have enter 5 characters in the combobbox. Below is my markup,

     <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1NeedDataSource" AllowSorting="true"
                ShowStatusBar="true" OnItemCreated="RadGrid1ItemCreated" OnItemDataBound="RadGrid_OnItemDataBound" ClientIDMode="Predictable">
                <PagerStyle Mode="NumericPages" />
                <MasterTableView AutoGenerateColumns="False"
                    Width="100%" CommandItemDisplay="Top" AllowMultiColumnSorting="True">
                    <CommandItemSettings ShowAddNewRecordButton="True" ShowRefreshButton="False"></CommandItemSettings>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="ItemPartNumb" HeaderText="Part Number">
                            <ItemTemplate>
                                <telerik:RadComboBox ID="rcbItemPartNumb" runat="server" Height="190px" Width="420px" ShowMoreResultsBox="True"
                                    EmptyMessage="Select a Item Part Number" EnableLoadOnDemand="True" OnItemDataBound="RcbItemPartNumbItemDataBound"
                                    MarkFirstMatch="true" HighlightTemplatedItems="true" OnSelectedIndexChanged="rcbItemPartNumb_OnSelectedIndexChanged"
                                    EnableVirtualScrolling="true" OnItemsRequested="RcbItemPartNumbItemsRequested" AllowCustomText="True"
                                    ClientIDMode="Predictable" AutoPostBack="True">
                                    <HeaderTemplate>
                                        <ul>
                                            <li class="col1">Item Part Number</li>
                                            <li class="col2">Description</li>                                        
                                        </ul>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <ul>
                                            <li class="col1">
                                                <%# DataBinder.Eval(Container.DataItem, "ItemPartNumb") %></li>
                                            <li class="col2">
                                                <%# DataBinder.Eval(Container.DataItem, "ItemDescription") %></li>                                        
                                        </ul>
                                    </ItemTemplate>                                
                                </telerik:RadComboBox>                            
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                                                                 
                        <telerik:GridBoundColumn DataField="ItemDescription" HeaderText="Description" UniqueName="ItemDescription">                        
                        </telerik:GridBoundColumn>                    
                        <telerik:GridTemplateColumn UniqueName="Quanities" HeaderText="Quanities">
                            <ItemTemplate>
                                <asp:TextBox runat="server" ID="txtQuanities" Height="10" Width="30" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                    
                    </Columns>                                
                </MasterTableView>                 
            </telerik:RadGrid>   

  2. eaigs
    eaigs avatar
    3 posts
    Member since:
    Nov 2011

    Posted 19 Feb 2013 Link to this post

    Hi Jack,
    Use the MinFilterLength property.

    Thanks
  3. Jack
    Jack avatar
    3 posts
    Member since:
    Dec 2012

    Posted 19 Feb 2013 Link to this post

    Thanks!
Back to Top