PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms DataGridView ReadOnly.

Reply

DataGridView ReadOnly.

 
Thread Tools Rate Thread
Old 14-12-2005, 12:07 PM   #1
Goh
Guest
 
Posts: n/a
Default DataGridView ReadOnly.


Dear all,

I got a question regarding to DataGridView. I would like to
invisible the first column that been generated by the DataGridView. This
columns is to help user to know the status of the row like new or edit.

my DataGridView only consist of data from database and a custom
columns that without binding. I dun need any insert or edit function in my
DataGridView. That why I dun think the first columns should visible.

How can I hide this columns? Do I have any component that can be use
for data rows display?


Thanks in advance for any kind of suggestion and help.


  Reply With Quote
Old 15-12-2005, 03:24 AM   #2
Jeffrey Tan[MSFT]
Guest
 
Posts: n/a
Default RE: DataGridView ReadOnly.

Hi Goh,

Thanks for your post.

Based on my understanding, you want to hide certain columns in
DataGridView. I assume the columns in the DataGridView are autogenerated by
winform databinding, yes? Then we can hide certain column with the code
below:
dataGridView1.Columns["CustomerID"].Visible = false;

For more information, please refer to the link below:
"How to: Remove Autogenerated Columns from a Windows Forms DataGridView
Control"
http://msdn2.microsoft.com/en-us/library/hbtwc35f.aspx

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

  Reply With Quote
Old 26-12-2005, 09:39 AM   #3
Jeffrey Tan[MSFT]
Guest
 
Posts: n/a
Default RE: DataGridView ReadOnly.

Hi,

Does my reply make sense to you? Is your problem resolved? Please feel free
to tell me, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off