Click to See Complete Forum and Search --> : Datagrid ... Please
jkcontra
Jan 23rd, 2003, 03:56 AM
:mad:
Please help. I want to Hide a column in my Datagrid after I have set the Grids datasource to a dataset.
powdir
Jan 23rd, 2003, 07:27 AM
might be a better way out there but you could consider using a dataview as the source...
jkcontra
Jan 23rd, 2003, 07:46 AM
Thanx powdir. What I want to do is to create an inner join, Then on my main Form have Textboxes for the main table and a datagrid for the table joined with the main table. The datagrid's datasource is set to the datatset. So what happens is the datagrid is showing both tables and the text boxes are showing the main table. Thats why I need to hide some columns.
powdir
Jan 23rd, 2003, 08:04 AM
Ok...kinda with you, but if your datagrid is displaying fields that are already displayed via textboxes why not use a dataview as i suggested to filter out these duplicates fields and then set the datagrid's datasource as the dataview...Cheers
Pirate
Jan 23rd, 2003, 01:25 PM
try this ...!
from MS VS Documentation
Dim ColumnIndex As Integer = 1
' Remove the second column
Dim myGridColumns As GridColumnStylesCollection
myGridColumns = DataGrid1.TableStyles(0).GridColumnStyles
myGridColumns.RemoveAt(ColumnIndex)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.