• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

how to hide a column in the datagrid --- for windows application not asp.net

Hi, to use the datagrid update method I had to show the primary key field in the datagrid. But I don't want user to see this field. How can i hide this field? It is a win app. not asp.net

thanks.
0
kate_y
Asked:
kate_y
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
tusharashahCommented:
Just befor you bind your DataGrid use put this code:

-------------------------------------------------------

Datagrid1.Column[n].Visible = false; // Where 'n' is your Column number for the primary key column.
-------------------------------------------------------

-tushar
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
tusharashahCommented:
ahh.. for WinForm...

Check out this article from kbalertz:

http://www.kbalertz.com/kb_317951.aspx

-tushar
0
 
kate_yAuthor Commented:
thank you guys. I got it.
0
 
tusharashahCommented:
Nice to have you going.

Thanks for A :-)

-tushar
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now