You must Sign In to post a response.
  • Category: ASP.NET

    How to speed up combobox binding

    How to speed up combobox binding in windowformapplication

    var list=ds.Tables[0].AsEnumerable()
    .Select(r => r.Field<string>("job")).ToArray();

    combobox.DisplayMember = "job";
    combobox.ValueMember = "job";
    combobox.DataSource = new BindingSource(list,null);

    In this below line,it is taking time to bind and it s very slow.. How to make it fast
    combobox.DataSource = new BindingSource(list,null);
  • #765877
    How many records are exist in database ? depend upon the record size it may take time.
    secondly your database connection is also affect the scenario.

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #765880
    Optimize your Data Base Query - using Index ,select Statement using Particular Record.

    use Stored Procedure to Retrieve the values from Data Base.

  • #765885
    1000 are in database.. Just single column in a table..

    Select query is fast.. only in this datasource binding it is taking time.. I checked with breakpoints

  • #765892
    Try this:

    Hope it helps.!

  • #765896

    try this type code only

    combobox.DisplayMember = "job";
    combobox.ValueMember = "job";
    combobox.DataSource = Datatable or Dataset or list

    Name : Dotnet Developer-2015
    Email Id :

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • Sign In to post your comments