What is the difference between ColumnNamn and Caption

T

Tony Johansson

Hello!

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this Caption
I just test to comment this caption out and I didn't notice any difference.

//Tony
 
J

Jeff Johnson

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this
Caption
I just test to comment this caption out and I didn't notice any
difference.

TOTALLY guessing here but it may be that the Caption property can be used by
certain applications to autopopulate a label when generating a data entry
form from the table on the fly.
 
J

Jeff Johnson

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this
Caption
I just test to comment this caption out and I didn't notice any
difference.

TOTALLY guessing here but it may be that the Caption property can be used by
certain applications to autopopulate a label when generating a data entry
form from the table on the fly.
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello!

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this Caption
I just test to comment this caption out and I didn't notice any difference.

//Tony

Hi,
Caption is the text is going to be printed in the interface,
ColumnMane is the name of the column for when you lookup by name:
table.Rows[0]["ColumnName"]
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello!

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this Caption
I just test to comment this caption out and I didn't notice any difference.

//Tony

Hi,
Caption is the text is going to be printed in the interface,
ColumnMane is the name of the column for when you lookup by name:
table.Rows[0]["ColumnName"]
 
T

Tony Johansson

Hello!

I do understand what you mean here
<ColumnMane is the name of the column for when you lookup by name:
<table.Rows[0]["ColumnName"]

But what do you mean here
<Caption is the text is going to be printed in the interface,

Can you give a simple example ?

//Tony

"Ignacio Machin ( .NET/ C# MVP )" <[email protected]> skrev i
meddelandet
Hello!

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this
Caption
I just test to comment this caption out and I didn't notice any
difference.

//Tony

Hi,
Caption is the text is going to be printed in the interface,
ColumnMane is the name of the column for when you lookup by name:
table.Rows[0]["ColumnName"]
 
T

Tony Johansson

Hello!

I do understand what you mean here
<ColumnMane is the name of the column for when you lookup by name:
<table.Rows[0]["ColumnName"]

But what do you mean here
<Caption is the text is going to be printed in the interface,

Can you give a simple example ?

//Tony

"Ignacio Machin ( .NET/ C# MVP )" <[email protected]> skrev i
meddelandet
Hello!

When I create a DataColumn there are two property called
ColumnName and Caption that is called on a DataColumn.
Here is an example.
column.Caption = "Price";
column.ColumnName = "Price";

My question is ColumnName is the Name of the column but what is this
Caption
I just test to comment this caption out and I didn't notice any
difference.

//Tony

Hi,
Caption is the text is going to be printed in the interface,
ColumnMane is the name of the column for when you lookup by name:
table.Rows[0]["ColumnName"]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top