Hi,
I have a collection of entities, let's say :
CustomersCollection costumersColl;
It's bounded to a listbox as DataSource.
I have a textbox to filter the elements in that listbox. Currently, the best way I've found to do this is to use two data tables :
- DataTable dtOriginal -> Contains every entities in costumersColl and is bounded to the listbox as DataSource
- DataTable dtCurrent -> is the result of a call to Select() to dtOriginal object. It's then bounded to the listbox. When the textbox search is cleared, I reset the data source of the listbox to dtOriginal.
Do you have any idea of a simpler/more efficient way in doing this ?
Regards,
Kal