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

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
0
Parth48
Asked:
Parth48
1 Solution
 
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
 
Dhanasekaran SengodanCommented:
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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
 
Dhanasekaran SengodanCommented:
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:
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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