Object Binding Series - Just Added One More!

Published 01 August 07 04:30 PM

I just added a new video (#4) to the Object Binding Series on filtering your custom objects -- based on customer request -- so keep them coming! The code is also attached.

Enjoy!

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Mike said on August 2, 2007 3:15 PM:

Beth,

Thanks for the video!  It was exactly what I needed.

# NZ said on August 3, 2007 10:43 AM:

Thanks for the awesome video. Its perfect.

Just a quick question: I followed you video and created my own database with no data. Update to the database and dataadapter works fine in the back end but my Datagridview row disaappears when I click outside the datagridview.

Not sure what I'm missing. Is there a property I need to set beside AllowUserToRows = True

# J.R. said on August 7, 2007 11:51 AM:

In the Sortable tutorial, when I close the form I an exception "Sort string contains a property that is not in the IBindingList".  I tried looking up the exception but received no hits.

# Beth Massi said on August 10, 2007 2:18 PM:

Hi NZ,

Make sure to call Me.Validate and Bindingsource.EndEdit before you call the update on the TableAdapter.

-B

# Beth Massi said on August 10, 2007 2:19 PM:

Hi Jr,

You can work around this bug by resetting the Sorts in the FormClosing event:

   Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

       Me.StateBindingSource.Sort = ""

       Me.CitiesBindingSource.Sort = ""

   End Sub

HTH,

-B

# Paul Guernsey Player said on April 29, 2008 5:33 PM:

These videos are great. Simple and understandable. And I didn't have to fly to Toronto or anything!

Congratulations on your 1 year anniversary.

# Paul Guernsey Player said on April 29, 2008 6:32 PM:

A possible improvement?

I added this line to the end of RemoveSortCore():

OnListChanged(New ListChangedEventArgs(ListChangedType.Reset, -1))

I causes the DataGridView to show the new row asterisk as soon as you click the remove sort button. Lets the user that he can now add a new row.

Leave a Comment

(required) 
(optional)
(required) 

About Beth Massi

Beth Massi is a Program Manager on the VS Community Team working with the Visual Basic Team producing developer content on MSDN and her blog (http://blogs.msdn.com/bethmassi). As a VB community champion and a member of the Microsoft community she helps run a .NET user group in the San Francisco Bay Area and is a frequent speaker at various software development events. Before Microsoft she was a Senior Systems Architect at a health care software product company and was a Microsoft Solutions Architect MVP. Over the last decade she has worked on distributed applications and frameworks using Visual Basic.NET, ASP.NET, SQL-Server, and Visual FoxPro. She has worked on various projects including developing object-oriented middle-tier frameworks, COM, .NET, Web and Windows-based applications using Microsoft development tools for a variety of businesses. She loves teaching, mountain biking, and modifying cars.

This Blog

Syndication

Page view tracker