SqlCommand cmd = new SqlCommand("SELECT * FROM naziv_tabele", connection);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds,"naziv_tabele");
ds.Tables["naziv_tabele"].Columns["id"].ColumnMapping = MappingType.Hidden;
dg.SetDataBinding(ds,"naziv_tabele");
A ako radis dodavanje kolona u TableStyles, samo ga izostavis
(Pokusavam uraditi reply na es-liste, da vidim da li to radi)
Dim myTableStyle As DataGridTableStyle
Dim myColumns As GridColumnStylesCollection
Dim dgCol As DataGridColumnStyle
Dim dgx As DataGridTextBoxColumn
For Each myTableStyle In DataGrid1.TableStyles
myColumns = myTableStyle.GridColumnStyles
' Iterate through the collection and print each
' object's type and width.
Dim i As Integer
For Each dgCol In myColumns