Dir Team i have a form include two tables master and detail 'textboxes & grid' i want to hide a coulmn from the grid i made tablestyle collection:,mapping table,collection,mapping coulmn width=0 STILL NOT WORKING
' Create new Table Style. Dim ts As New DataGridTableStyle ' Allocate it a mapping name ts.MappingName = "Person" ' Note this is the same name as the Table ' Get rid of the default TableStyle DataGrid1.TableStyles.Clear() ' Add this Style to the Collection DataGrid1.TableStyles.Add(ts) ' Assign New Widths and Col Header Text to DataGrid columns. With DataGrid1.TableStyles("Person") ' Next two columns will not be shown to user .GridColumnStyles(9).Width = 0 .GridColumnStyles(9).HeaderText() = "ID" ' Not seen .GridColumnStyles(10).Width = 0 .GridColumnStyles(10).HeaderText() = "Categories" ' Not Seen End With
Yes the DataGridView control is new for VS2005 and not available in the earlier versions. (And the VS2003 DataGrid doesn't have an AutoGenerateColumns Property. )
Dear Professor Ged Mead Thank you Thank you very very much AT LAST it works BUT -The colores of the format is gone even by code like backcolorselection and line is light and other is dark 'all of them are white' -How to capture the Key from the master and insert it in to hided column (Details) IF YOU HAVE SOME TIME Thank you Thank you very much
' Just manually add your coloumns Dim DataGridColumn As New DataGridViewTextBoxColumn DataGridColumn.DataPropertyName = Column.ColumnName DataGridColumn.HeaderText = Column.ColumnName DataGridColumn.Name = Column.ColumnName DataGridView1.Columns.Add(DataGridColumn)
Dear Ged i am realy Thank you very much for you help...i will try this code today and i will reply on you very soon this is if you have some time for me thank you very much
Dear jasonjcyr Thankyou very much for replying me i am using vb.net 2003 and.... i looked for this control and i couldnt find it is it for 2005 only and if it is...can i use it in 2003 couse the bita version 2005 is exist only....any idiea..... Thank you very much
Hidding NOT working
crbentle
' Create new Table Style.
Dim ts As New DataGridTableStyle ' Allocate it a mapping name
ts.MappingName = "Person" ' Note this is the same name as the Table ' Get rid of the default TableStyle
DataGrid1.TableStyles.Clear() ' Add this Style to the Collection
DataGrid1.TableStyles.Add(ts) ' Assign New Widths and Col Header Text to DataGrid columns.
With DataGrid1.TableStyles("Person") ' Next two columns will not be shown to user
.GridColumnStyles(9).Width = 0
.GridColumnStyles(9).HeaderText() = "ID" ' Not seen
.GridColumnStyles(10).Width = 0
.GridColumnStyles(10).HeaderText() = "Categories" ' Not Seen End With
Emmersko
Yes the DataGridView control is new for VS2005 and not available in the earlier versions. (And the VS2003 DataGrid doesn't have an AutoGenerateColumns Property. )
ErickLopez
Thank you Thank you very very much AT LAST it works
BUT
-The colores of the format is gone even by code like backcolorselection
and line is light and other is dark 'all of them are white'
-How to capture the Key from the master and insert it in to hided column
(Details)
IF YOU HAVE SOME TIME
Thank you Thank you very much
Manolis P
DataGridView1.AutoGenerateColumns =
False' Just manually add your coloumns
Dim DataGridColumn As New DataGridViewTextBoxColumn
DataGridColumn.DataPropertyName = Column.ColumnName
DataGridColumn.HeaderText = Column.ColumnName
DataGridColumn.Name = Column.ColumnName
DataGridView1.Columns.Add(DataGridColumn)
Bhupesh Mohan
i am realy Thank you very much for you help...i will try this code today
and i will reply on you very soon
this is if you have some time for me
thank you very much
bell.joshua
Thankyou very much for replying me
i am using vb.net 2003 and.... i looked for this control and i couldnt find it
is it for 2005 only and if it is...can i use it in 2003 couse the bita version
2005 is exist only....any idiea.....
Thank you very much