Solved

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

Posted on 2011-03-03
7
927 Views
Last Modified: 2012-05-11
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
Comment
Question by:Parth48
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 13

Expert Comment

by:Naman Goel
ID: 35025064
for that you have to customize each column and select width of that column in data grid.
0
 
LVL 13

Expert Comment

by:agarwalrahul
ID: 35025384
0
 
LVL 14

Expert Comment

by:Dhanasekaran Sengodan
ID: 35025548
0
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.

 

Author Comment

by:Parth48
ID: 35025815
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
 
LVL 14

Accepted Solution

by:
Dhanasekaran Sengodan earned 500 total points
ID: 35026024
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
 
LVL 13

Expert Comment

by:Naman Goel
ID: 35027447
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
 
LVL 13

Expert Comment

by:Naman Goel
ID: 35027494
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question