SqlDataTable calls CreateColumns() to add DataColumn components to the associated PgSqlDataTable.
Instead of creating DataColum types i would like to use my custom DataColumn Type MyDataColumn instead.
Is there a way to implement that so i can use my descendant DataColumn type with PgSqlDataTable?
What i tried now is this:
Code: Select all
protected override void CreateColumns()
{
base.CreateColumns();
// Replace with descendant type
for (int i = Columns.Count - 1; i > -1; i--)
{
MyDataColumn col = new SqlColumn();
col.ColumnName = Columns[i].ColumnName;
col.DataType = Columns[i].DataType;
Columns.RemoveAt(i);
Columns.Add(col);
}
}