DataGrid Displays

Morn

Active member
Joined
Dec 4, 2006
Messages
40
Programming Experience
Beginner
I think that I am in the correct place for this one.

I have two questions about the display off data grids,

1) Is there any way of changing the titles of the fields displayed. For example it presently displays the field name from the DB (custID) rather than the nice Customer ID that I want it to display.

2) I have a table that stores some activity's that people can book, the activity id is stored in a bookings table. When I fill the data grid with the booking info it obviously states the activity ID rather than the Name of the activity. Do i need to edit the SQL to get the name value or can I do it using the form control?

Thanks
Graham
 
Are your grid details configured at design time or run time?

If at design time, go into the display columns properties of the grid and change the header.
If at run time, you need to code the header in, if memory serves right (probably wrong) then it would be something like
With me.datagrid1
.columns(0).header.text = "Customer ID"
.columns(1).header.text = "Customer Name"
End With

As for (2), not sure....this was one of the reasons I used ComponentOne components in my 1.1 applications because of the amount of ID's I needed translating to values...

I'm just installing VS2005 now, so I'll be able to confirm in about 10 minutes!!
 
Back
Top