|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Another DataGrid ProblemHi, 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? chook.ha***@gmail.com wrote:
Show quote > Hi, I have another problem with my datagrid I'm guessing here.> 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? Add a datamapping to the dataadaptor, and do not mention this column. Then, when setting the datasource, use this mapped version. B. 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. > SkyHook wrote:
Show quote > DataGridView.Columns[index].Visible = false; doesn't do what you want? There is no such option. Perhaps because i am using a windows form.> > "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. > > Ultimately, the way to do it is: DataSet.Tables(table).Columns(column).ColumnMapping() = MappingType.Hidden B. |
|||||||||||||||||||||||