Re: Another DataGrid Problem by Brian
Brian
Tue Jun 20 10:33:51 CDT 2006
SkyHook wrote:
> DataGridView.Columns[index].Visible = false; doesn't do what you want?
>
> "Brian Tkatch" <Maxwell_Smart@ThePentagon.com> wrote in message
> news:1149694692.977430.250640@j55g2000cwa.googlegroups.com...
>
> > chook.harel@gmail.com wrote:
> >> Hi, I have another problem with my datagrid
> >> I used the dataSet to retrieve certain columns from the db,
> >> one of them is the unique index of the row.
> >> but, i don't want the user to see this column, as it means nothing to
> >> him
> >> but still I want to be able to get the row indext programatically,
> >> so I hide the column with width=0, but it didn't work that good,
> >> moreover it created a Horz scroll bar, so that you can navigate to the
> >> hidden column,
> >>
> >> Is there a way to disable the horz scrollbar of a datagrid (not
> >> datagridview)
> >>
> >> I tried several options, but the hide function doesn't serve my needs,
> >> because it is blocking half of the last row..
> >>
> >> Anyway, anyone, any idea?
> >
> > I'm guessing here.
> >
> > Add a datamapping to the dataadaptor, and do not mention this column.
> > Then, when setting the datasource, use this mapped version.
> >
> > B.
> >
There is no such option. Perhaps because i am using a windows form.
Ultimately, the way to do it is:
DataSet.Tables(table).Columns(column).ColumnMapping() =
MappingType.Hidden
B.