Connecting Tech Pros Worldwide Forums | Help | Site Map

Column headers showing as it is in the table in DataGridView

Newbie
 
Join Date: Aug 2008
Posts: 8
#1: Sep 8 '08
Hi

I already bind a DataGridView to a databse. My DataGridView is showing column names as it is in the table. I want to show user-friendly column names in the grid instead of column names in the database table. Please help me in this reagard. Thanx in advance

balabaster's Avatar
Moderator
 
Join Date: Mar 2007
Location: Canada
Posts: 757
#2: Sep 8 '08

re: Column headers showing as it is in the table in DataGridView


In design mode, click the smart menu link and choose properties. In the window that pops up, you can edit each of the column's header, binding, data, whatever you like.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,131
#3: Sep 8 '08

re: Column headers showing as it is in the table in DataGridView


You can also develop an Item Template that is used to configure how your DataGridView is displayed. To create one of these you will need to create a class that implements the ITemplate Interface.

-Frinny
Reply