Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide columns in datagrid

Status
Not open for further replies.

mur3x

MIS
Sep 8, 2003
31
LK
Hi! i use a recordset to set datagrid datasource.
as below,

Code:
rs.open "select ID,name,Desc from table" 'rs recordset
set dg1.datasource=rs 'datagrid dg1

My problem is how to hide 'ID' field from the datagrid.
I dont want to display that column.

I know there's a property named 'visibleCols' in datagrid.
it gives the number of columns displayed. How can i put it
to use to hide a column. Any other alternative too will be
great!.

thnx
Mur.
 

To make a column invisible, try

DataGrid1.Columns(0).Visible = False

"VisibleCols" has a different purpose.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top