[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Visual Studio 2008 -- DataGridView "Column Naming" ?

Posted on 2010-01-05
5
Medium Priority
?
209 Views
Last Modified: 2013-12-17
How can I do something like the below
"Possbile Steps" so I don't have to do
the below "Current Steps" each time
I create a new form?

Basically I want my column
names to be real names, not
dataGridViewTextBoxColumn5, etc
-------------------------------------------------
Possbile Steps
 1. open DataSet1.xsd
 2. doubleClick GML_ROITEM table
 3. do GLOBAL column renaming HERE
-------------------------------------------------
Current Steps
 1. drag "Data Sources" WINDOW table onto page
 2. open "Edit Columns" (attached 1.jpg)
 3. click on BRAND column
 4. change circled NAME from
    dataGridViewTextBoxColumn5 to
    BRAND
 5. repeat for all other columns
-------------------------------------------------
Temp Steps
 1. drag "Data Sources" WINDOW table onto page
 2. open "Edit Columns" (attached 1.jpg)
 3. click on BRAND column
 4. click "Remove"
 5. click "Add"
 6. select BRAND column
 7. circled NAME automatically
    displays as BRAND
1.jpg
0
Comment
Question by:finance_teacher
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:zell71
ID: 26182070
if you are using business objects & data binding to those you can do the following:
[DisplayName("Book ID")]
public string BookID { get; set;}
0
 

Author Comment

by:finance_teacher
ID: 26182103
I am using drag/drop features of VS 2008

How can I do this via DataSet1.xsd ?
0
 
LVL 6

Accepted Solution

by:
zell71 earned 2000 total points
ID: 26182187
i'm alittle confused what you are trying at achieve...you don't want to use the API to set column headers?check this out:
http://en.csharp-online.net/Presenting_Data_with_the_DataGridView_Control_in_.NET_2.0%E2%80%94Using_the_Designer_to_Define_Grids

ok, maybe someone else will have a suggestion.
 
0
 

Author Comment

by:finance_teacher
ID: 26182245
I do it like
http://en.csharp-online.net/Presenting_Data_with_the_DataGridView_Control_in_.NET_2.0%E2%80%94Using_the_Designer_to_Define_Grids
talks about, but want to eliminate having to do the below
dataGridViewTextBoxColumn5 to BRAND renaming steps that are needed each time I create a new form.

Current Steps
 1. click on BRAND column
 2. change circled NAME from
    dataGridViewTextBoxColumn5 to
    BRAND
 3. repeat for all other columns
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

830 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