Home > Uncategorized > Fix to SortableBindingList for VB.NET

Fix to SortableBindingList for VB.NET

The typical example of the SortableBindingList in VB.NET (http://www.tech.windowsapplication1.com/content/sortable-binding-list-custom-data-objects) does not work when the datasource is an Collection Of T, rather than a List Of T.

A Fix I used was this;

 

Sub New(ByVal list As ICollection(Of T))
MyBase.New(New List(Of T)(list))
End Sub

Then the cast in ApplySortCore works …

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: