Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Auto-Complete Sample Project Needed
posted

Hi All,

I really need some help here. I am a Infragistic newbie and am attempting to mimick the Ajax Toolkit TextBox autocomplete with the WebDropDown (WDD) control. I essentially need to display user names, and capture user_id upon selection, so I thought the WDD would be perfect.

The issue for me is that currently my db holds 170,000 records and it will grow. With the AJAX toolkit auto-complete extender I am able to retrieve records fairly quickly using a prefix, but I then lose the user_id.

I studied the sample at http://samples.infragistics.com/2010.1/WebFeatureBrowser/Default.aspx but there are so many client and server side properties, I don't find that sample helpful. 

I also looked at http://community.infragistics.com/forums/t/25626.aspx?PageIndex=2 but I am just getting more confused since there are no complete samples

I would really like a complete sample project where records are retrieved from a SS db  and bound to the WDD, and as one can types in the WDD, records are returned according to the prefix int the WDD text box. I like to use ObjectDataSources but can easily use a datatable or follow a sample

Thank you in advance for any help,

Frank

Parents
  • 165
    posted

    I have it working somewhat now by increasing the Autofiltertimeout, however upon dragging the scrollbar, thereby triggering a LoadOnDemand, moving curser back into text box and entering entirely new values throws a Javascrip error

    'Error: 'get_items().getItem(...)' is null or not an object'

    If I remove the javascript I added, then nothing appears in the WDD after using its scrollbar, no matter what I type. Pleas help.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    <

     

     

     

    head runat

    ="server">

     

     

     

     

    <title></title

    >

    </

     

     

     

    head

    >

    <

     

     

     

    body

    >

     

     

     

     

    <form id="form1" runat

    ="server">

     

     

     

     

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat

    ="server">

     

     

     

     

    </asp:ToolkitScriptManager

    >

     

     

     

     

    <div

    >

     

     

     

     

    <ig:WebDropDown ID="WebDropDown1" runat="server" Width="250px" EnableAutoFiltering

    ="Server"

     

     

     

     

    AutoFilterResultSize="20" AutoFilterSortOrder="Ascending" EnableCachingOnClient

    ="True"

     

     

     

     

    EnableLoadOnDemand="True" AutoFilterTimeoutMs="1500" TabIndex="1" TextField

    ="Name"

     

     

     

     

    ValueField

    ="Contact_Id">

     

     

     

     

    <Button AltText=""></Button

    >

     

     

     

     

    <DropDownItemBinding TextField="Name" ValueField="Contact_Id"

    />

     

     

     

     

    <ClientEvents ItemsRequested="itemsRequested"

    />

     

     

     

     

    </ig:WebDropDown

    >

     

     

     

     

    </div

    >

     

     

     

     

    </form

    >

    </

     

     

     

    body

    >

    <

     

     

     

    script type

    ="text/javascript">

     

     

     

     

    function

    itemsRequested(sender, args) {

    sender.set_currentValue(sender.get_items().getItem(0).get_text(),

     

     

    true

    );

    }

     

    </

     

     

     

    script

    >

    </

     

     

     

    html

    >

     

     

     

     

    usp_Contact_Get_Contact_NamesTableAdapter TA = new usp_Contact_Get_Contact_NamesTableAdapter();

     

     

    DataTable dt = new DataTable();

    //CODEBEHIND

     

     

    protected void Page_Load(object sender, EventArgs e)

    {

     

     

    if (!IsPostBack)

    {

    dt = TA.Contact_NamesCombined();

    Session.Add(

     

    "Names", dt);

    WebDropDown1.Focus();

    }

     

     

    else

    {

    WebDropDown1.DataSource = (

     

     

    DataTable)Session["Names"

    ];

     

Reply Children