Sort a BindingList
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
Hello:
I want to know the best way to sort a BindingList without needed to
turn it into a DataTable. Of course, my BindingList is being used
indirectly by a BindingSource.
So, how do I sort a BindingList of my custom business objects? For
instance, when the user clicks on a column header of a DataGridView, I
would like sorting to be handled for me (or to call a custom sort
method I provide).
If this isn't supported, that would be good to know.
Thanks,
Travis
.
Relevant Pages
- Re: Very odd Sort problem when modifying DGV bound data
... If you are using .Net 2.0, you might try putting a BindingSource between ... BindingSource myBindingSource = new BindingSource; ... specifying the Sort string via the DataTable.DefaultView.Sort property. ... DGV displays the items it makes a mess of it all. ... (microsoft.public.dotnet.languages.csharp) - Re: windows forms datagridview doesnt sort automatically
... The BindingListclass does not implement sorting. ... I have a form with a datagridview bound to a BindingSource. ... How do I sort programmatically, ... The Binding Source datasource is a class, ... (microsoft.public.dotnet.framework.windowsforms) - Re: Can I make a combobox that is stronly typed?
... I came up with the following for SortedList(Of String, StringWithInteger) ... ComboBox disallows sort if a datasource is used. ... For binding to a combobox, I think a BindingList is overkill. ... the BindingSource has sort capabilities. ... (microsoft.public.dotnet.languages.vb) - Re: Can I make a combobox that is stronly typed?
... System.Collections.Generic.KeyValuePair(Of String, .StringWithInteger) ... ComboBox disallows sort if a datasource is used. ... the BindingSource has sort capabilities. ... (microsoft.public.dotnet.languages.vb) - Re: Can I make a combobox that is stronly typed?
... I'll also try List with the sort method you pointed out but I would like ... For binding to a combobox, I think a BindingList is overkill. ... There's no reason for you to not use a List ... the BindingSource has sort capabilities. ... (microsoft.public.dotnet.languages.vb) |
|