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
Performance and Filtering

Hey all,

I'm looking at binding a DataTable to the drop down.  There are 2 columns (Code and Name) in the DataTable and 1,400+ rows.

Ideally, I want to be able to search as you type.  But it seems to take forever to do it.  I am binding in code to do this when the page is loaded using the following simple 3 lines:

WebDropDown1.DataSource = ds.Tables(0)
WebDropDown1.TextField =
WebDropDown1.DataKeyFields = "Code"

Is there a fast way to do this when running (or any suggestions) ?

Can you display Code and Name in the dropdown portion?  I've looked at the WebCombo which pretty much displays what I want but is slow also - and I can't see how to implment search as you type.

Any pointers would be good thanks.

  • 24671
    Suggested Answer


    You should not rebind on every Page_Load. You should check whether the request is postback, and only if it is initial page load, databind and set a DataSource.

    Client side filtering and LoadOnDemand are not compatible. Client-side filtering only filters on the client, while load on demand does an AJAX request to fetch more data from the server.

    Moreover, client filtering will load and create all items at once on the client.

    I would suggest using Server filtering with LoadOnDemand=True, and a reasonable PageSize setting. If you only set EnableAutoFiltering="Server", you do not need any code in the code behind. You can also use the paging functionality. Both paging and load on demand work fine with server-side filtering. 

    What is your current value for PageSize ? If it is zero, all items will be loaded anyway.

    I hope this helps. Thanks for the feedback,


Reply Children