borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Adodc and flexgrid how to connect:()Next Topic (How do I store form data to db?) New Topic New Poll Post Reply
AndreaVB Forum : Database : How can I hide a column in a DataGrid?
Poster Message
user777
Level: Scholar

Registered: 18-09-2005
Posts: 40

icon How can I hide a column in a DataGrid?

Dear Friends,

1.  How can I hide a column (here for example I dont like to view "cusnum" column in a form at run-time) from DataGrid.

2.  How can I change the labels of DataGrid (for example I would like to change "fname" & "lname" to 'First Name' & 'Last Name'

Please help me in this regard.



____________________________
user777

____________________________
Attached:
ADO2.zip 36 KB (Downloads: 0)

10-10-2005 at 09:55 AM
View Profile Send Email to User Show All Posts | Quote Reply
TJ_01
Level: VB Lord


Registered: 24-08-2005
Posts: 320
icon Re: How can I hide a column in a DataGrid?

Your code must be something like this in order to change the column header name of datagrid.

DataGrid1.Columns(0).Caption = "sample"


HTH..

____________________________
Im JAMES  

11-10-2005 at 03:33 AM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: How can I hide a column in a DataGrid?

To Hide the column simply set its width to Zero


____________________________
multi-tasking - the ability to hang more than one app. at the same time.

11-10-2005 at 07:54 AM
View Profile Send Email to User Show All Posts | Quote Reply
boit
Level: Scholar

Registered: 28-04-2005
Posts: 42
icon Re: How can I hide a column in a DataGrid?

or simply

datagrid1.columns(0).visible = false

18-10-2005 at 02:02 PM
View Profile Send Email to User Show All Posts | Quote Reply
Gary
Level: Sage

Registered: 27-11-2005
Posts: 50
icon Re: How can I hide a column in a DataGrid?

Hi fren,

You can right click on the datagrid and select Properties. In Properties:

1. Select layout,
2. Select the column that you want,
3. Uncheck the visible checkbox

Finally, you will hide the column that you do not want...

14-10-2006 at 08:55 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : How can I hide a column in a DataGrid?
Previous Topic (Adodc and flexgrid how to connect:()Next Topic (How do I store form data to db?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder