BindingSource CodeSample - Creating dynamically
From Visual WebGui Wiki
| This article will have a few sections added to it soon, based on the following article type skeleton: NewCodeSampleTemplate |
Overview
Creating a BindingSource in Visual WebGui, requires calling of BeginInit() and EndiInit() to properly initialize it. Here is a neat function to produce new BindingSource objects for you, which allready have been initialized. Declaring the function as Shared optimizes the code even more.
VB.NET Code
Public Shared Function CreateBindingSource() As BindingSource Dim mySource As New BindingSource() CType(mySource, System.ComponentModel.ISupportInitialize).BeginInit() CType(mySource, System.ComponentModel.ISupportInitialize).EndInit() Return mySource End Function
C# Code
| The conversion of this code to C# has not been completed yet. Please feel free to contribute and add contents to the Wiki |
