Home All Groups Group Topic Archive Search About

Another DataGrid Problem

Author
7 Jun 2006 7:52 AM
chook.harel
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?

Author
7 Jun 2006 3:38 PM
Brian Tkatch
chook.ha***@gmail.com wrote:
Show quote
> 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.
Author
13 Jun 2006 7:21 PM
SkyHook
DataGridView.Columns[index].Visible = false; doesn't do what you want?

Show quote
"Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
news:1149694692.977430.250640@j55g2000cwa.googlegroups.com...

> chook.ha***@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.
>
Author
20 Jun 2006 3:33 PM
Brian Tkatch
SkyHook wrote:
Show quote
> DataGridView.Columns[index].Visible = false; doesn't do what you want?
>
> "Brian Tkatch" <Maxwell_Sm***@ThePentagon.com> wrote in message
> news:1149694692.977430.250640@j55g2000cwa.googlegroups.com...
>
> > chook.ha***@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.

AddThis Social Bookmark Button