Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > Visual Studio 2008
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 5th, 2011, 09:17 AM
Registered User
 
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
 
Old December 5th, 2011, 01:01 PM
Registered User
 
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 





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 12:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.