How to speed up combobox binding

Posted by Oswaldlily under Windows Forms on 5/11/2016 | Points: 10 | Views : 435 | Status : [Member] | Replies : 1
How to speed up combobox binding in windowformapplication

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

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



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);





Responses

Posted by: Bhuvanesh6 on: 7/25/2016 [Member] Starter | Points: 25

Up
0
Down
Are you using any "Cache" instance, which can help you to fetch and have the data in cache and provide information.

Refer: http://www.codeproject.com/Articles/8977/Using-Cache-in-Your-WinForms-Applications

Bhuvan

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response