how can i customizing DataGrid in C#.net window application ??

i want to know that how can i customizing Datagrid in C#.net window application ??

here i attach one snapshot , please refer the attached snapshot ....

give me some suggestions ..
03-03-2011-2-02-16-PM.png
Parth48Asked:
Who is Participating?
 
Dhanasekaran SengodanConnect With a Mentor Commented:
grid.Columns[0].HeaderText

                    or

grid.Columns["columnname"].HeaderText

                     or

public Form1()
    {
        InitializeComponent();

        grid.Columns[0].HeaderText = "First Column";
        //..............
    }


More details are http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.columns.aspx at MSDN. More details about DataGrid are http://msdn.microsoft.com/en-us/library/e0ywh3cz.aspx
0
 
Naman GoelSoftware engineer 1Commented:
for that you have to customize each column and select width of that column in data grid.
0
 
Rahul AgarwalTeam LeaderCommented:
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Dhanasekaran SengodanCommented:
0
 
Parth48Author Commented:
i want to change the column header ,but how can i change it ??

instead of uname it's UserName

but how can i change it ??
0
 
Naman GoelSoftware engineer 1Commented:
Hey for that you can use HeaderText property.

just select the column from Properties explorer in visual studio and change the HeaderText property

following are the list of properties with DataGridViewColumn object

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn_properties.aspx
0
 
Naman GoelSoftware engineer 1Commented:
following link is giving complete walk through

http://www.dotnetperls.com/datagridview-columns
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.