Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > Visual Studio 2008
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 5th, 2011, 08:17 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How Change the Header Names in the DataGridView1 By DataGridView2

How Change the Header Names in the DataGridView1 By DataGridView2

In the sense

I want to change the title in the pole DataGridView1
Through the fields in the first column DataGridView2

The first field in DataGridVeiw2 =The first column heading in the DataGridView1

the second field in DataGridVeiw2 =The second column heading in the DataGridView1

And so on
Reply With Quote
  #2 (permalink)  
Old December 5th, 2011, 12:01 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This code will change the title of the column in DataGridView1

Violin, but I want to change the title of the second column of the Cells(1).Value

And the third column and fourth to no end



PHP Code:
 For As Integer 0 To DataGridView2.Rows.Count 1
            
If DataGridView2.Rows(i).Cells(0).Selected True Then

                DataGridView1
.Columns(0).HeaderText DataGridView2.Rows(i).Cells(0).Value
            End 
If
        
Next 
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change embeded pictures in excel to file names exceldude Excel VBA 2 October 30th, 2012 04:46 AM
Crystal Report for visual studio 2010, How to change header text at runtime using C# samio2008 BOOK: Professional Crystal Reports for VS.NET 0 August 29th, 2011 09:54 AM
2 names in a record michael193nj Access 4 March 19th, 2008 05:11 PM
Change Crystal Report Viewer header matrix_evo Crystal Reports 0 July 18th, 2006 04:00 AM
To Many Names bachuss SQL Language 0 January 18th, 2006 11:40 AM



All times are GMT -4. The time now is 06:23 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.