BCGControlBar Library for .NET
SetColumnFromDataTable Method




Specifies a DataTable to read columns from.
Specifies whether to remove the existing columns first.
Adds columns to Grid control from DataTable.
Syntax
'Declaration
 
Public Sub SetColumnFromDataTable( _
   ByVal table As DataTable, _
   ByVal clearFirst As Boolean _
) 
'Usage
 
Dim instance As DBGrid
Dim table As DataTable
Dim clearFirst As Boolean
 
instance.SetColumnFromDataTable(table, clearFirst)
public void SetColumnFromDataTable( 
   DataTable table,
   bool clearFirst
)
public: void SetColumnFromDataTable( 
   DataTable* table,
   bool clearFirst
) 
public:
void SetColumnFromDataTable( 
   DataTable^ table,
   bool clearFirst
) 

Parameters

table
Specifies a DataTable to read columns from.
clearFirst
Specifies whether to remove the existing columns first.
Remarks
Call this function to add columns to Grid control from the specified data table. You can set the clearFirst parameter to false to add these columns to non-databound columns.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DBGrid Class
DBGrid Members

Send Feedback