Re: windows forms datagridview doesn't sort automatically



I did find some examples of adding sorting to a BindingList, but it seems
easier just to use datasets.

Thanks.
Bill


"Jack Jackson" <jjackson@xxxxxxxxxxxxxxxx> wrote in message
news:83b3345rm6v5cllouotr0ba9vna4pge8nr@xxxxxxxxxx
The BindingList(Of T) class does not implement sorting. If you search
the Internet you can find several examples of how to add sorting to
it.

I created my own class which subclasses BindingList, added sorting and
searching capabilities, then I use that class instead of BindingList.

On Mon, 19 May 2008 11:49:22 -0400, "BillE" <belgie@xxxxxxxxxxx>
wrote:

I'm building a windows forms application using vs2005, vb.net.

I have a form with a datagridview bound to a BindingSource.

Even though the Sortmode is set to Automatic for all columns, they do not
sort when the header is clicked.

Is this because of the type of datasource I am using?

How do I sort programmatically, if I can't sort automatically?

The Binding Source datasource is a class, which exposes a BindingList of
class objects.

Thanks
Bill



.



Relevant Pages

  • Data Oriented vs Object Oriented Design
    ... I'm working on an Winforms client application using VS ... "Sorting and filtering capability is exposed in the BindingSource ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Alternative to DataSet
    ... If you use a bindingsource between your control and the dataset, it will handle the sorting for you. ... If you use customer business objects, you have to write your own sort routines. ...
    (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)
  • windows forms datagridview doesnt sort automatically
    ... I have a form with a datagridview bound to a BindingSource. ... How do I sort programmatically, ... The Binding Source datasource is a class, ... class objects. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Sort a BindingList
    ... indirectly by a BindingSource. ... how do I sort a BindingList of my custom business objects? ... would like sorting to be handled for me (or to call a custom sort ...
    (microsoft.public.dotnet.languages.csharp)