BindingSourceNode Request

BindingSourceNode Request

Old forum URL: forums.lhotka.net/forums/t/7036.aspx


xAvailx posted on Tuesday, June 02, 2009

I've recently started using the BindingSourceNode class, it is awesome! Saves a lot of UI plumbing specially when dealing with many binding sources.

I've just come across a scenario where it would have been useful to access the "children" collection of the binding source to apply"SuspendBinding" and "ResumeBinding". So my request is, can the properties scope be changed to "Protected Internal" so I can create my own base class and use the underlying properties as needed? Right now they are onlyl internal and I have to modify the csla src to make this change.

Edit: And make the Source property Public.

This is what my base class looks like:

Public Class ATBindingSourceNode
Inherits Csla.Windows.BindingSourceNode

Public Sub New(ByVal source As System.Windows.Forms.BindingSource)
MyBase.New(source)
End Sub

Public Sub SuspendBinding()
For Each child In Me.Children
child.Source.SuspendBinding()
Next
End Sub

Public Sub ResumeBinding()
For Each child In Me.Children
child.Source.ResumeBinding()
Next
End Sub

End Class

xAvailx replied on Tuesday, June 02, 2009

Actually, just making Source and Children public would work for my scenario. Otherwise I ran into problems with down casting when using the BindingSourceHelper class.

Copyright (c) Marimer LLC