Binding DataSet with changed col. captions

G

GrumpyDev

Hi. My question is regarding binding a DataSet to a
DataGrid. When I change Caption property of all column in
my dataset and then bind dataset to a DataGrid, new
caption aren't displayed in a grid header. A DataGrid
displays captions (field names) from a query that was used
to build a dataset.

For example (this is not a real example), I have a dataset
build on "Select OrderID from Orders". I then change a
caption property of a first column to 'Order Number' and
bind my dataset to a grid. In column header I
see 'OrderID', not 'Order Number'.

Is that a bug? Does anybody have similar problems?
I know that to solve my problem I can include a new
caption in a select statement (Select OrderID [Order
Number] from Orders). But in my case, I need to change it
manually.

Also, I'm just curious. I would think that DataGrid
display column headers from Caption properties of each
column.
 

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

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top