Another DataGrid Problem

C

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?
 
B

Brian Tkatch

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.
 
B

Brian Tkatch

SkyHook said:
DataGridView.Columns[index].Visible = false; doesn't do what you want?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top