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
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">
>
</
head
body
="Server"
="True"
="Name"
="Contact_Id">
/>
script type
="text/javascript">
itemsRequested(sender, args) {
sender.set_currentValue(sender.get_items().getItem(0).get_text(),
true
);
}
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 = (
];
Hi,
You don't need to handle ItemsRequested on the client , and set the current value. The control does it for you. Also you don't need the Update Panel, since the filtering causes an AJAX request also by itself.
Everything you need to do is set EnableAutoFiltering=Server, then (depending on the number of records in your DB) , use either LoadOnDemand or Paging (EnableLoadOnDemand=true or EnablePaging=true), and set your page size , PageSize=1000 for example.
This should do it.
I am attaching a sample for you.
Please let me know if you still experience issues.
Thanks,
Angel