473,500 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I hide a column in a datagrid

Hello!

Assume I have a datasource consisting of a database table. This table has 5
column.

If I now want to use a bound datagrid but want to display only 4 of these 5
columns is that possible.

How is that done?

I assume I must hide the column that should not be displayed in some way.

//Tony
Oct 24 '07 #1
1 2261
TonyJ wrote:
Assume I have a datasource consisting of a database table. This table has 5
column.

If I now want to use a bound datagrid but want to display only 4 of these 5
columns is that possible.
Are we talking a DataGrid in .NET 1.1, or a DataGridView in .NET 2.0+?
How is that done?

I assume I must hide the column that should not be displayed in some way.
With a DataGridView yes, you just set the DataGridViewColumn's Visible
attribute to false.

Chris.
Oct 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6271
by: CBuck | last post by:
Hi, I was wondering if it was possible to hide the first column of the datagrid (windows form control). The column that I am referring to is the column created by the control that is gray in color...
6
8391
by: Das | last post by:
Hi everyone, I'm using datagrid control to display the data. I want to hide column to be displayed into the data grid. I'm using the code as given below: Method given below is used to bind the...
2
4293
by: Thanh Nu | last post by:
Hi, I would like to hide a column in a web datagrid (with create columns automatically at runtime checked), and I cannot refer to the columns collection like this: DataGrid1.Columns(0).Visible...
1
2712
by: enak | last post by:
I populate a datagrid by setting the datasource to a datatable. I then, bind them. After that I try to hide the last column but am not able to. I get an error message. Here is my code: ...
8
7301
by: Hanson | last post by:
I have a datagrid control in an aspx page. The datagrid columns will be dynamically generated according to the pre-page's search condition, I want to hide some columns in the datagrid. is that...
3
1701
by: sivaraman.S | last post by:
Hi friends, How to hide a column in datagrid. regards, Sivaraman.S
5
7799
by: J | last post by:
Ok, they have changed a lot of stuff in VB.net. How in the world do you hide a column on the Datagrid? -- Jason
2
18872
by: Keithb | last post by:
I need to hide a GridView's "edit" column if the user's role does not support editing. However, the column's Visible property does not support databinding. Is there a workaround? Thanks, ...
1
2988
by: nuhura01 | last post by:
Hi all.. I have a datagrid in my system and I preview the datagrid in other html page. Below are the code that I'm using: Dim oStringWriter As System.IO.StringWriter = New...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.