Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to format a column in a datagrid? 1

Status
Not open for further replies.

timoteo

Technical User
Sep 17, 2002
72
US
I have a datagrid that I define in code. The code looks like this:

'For colums in dgdDonHist
Dim colDonHistAcctNum As Column
Dim colDonYear As Column
Dim colDonAmt As Column
Dim colDonPostDate As Column

'Sets data source for dgdDonHist
Set dgdDonHist.DataSource = rsDonHist

'Sets columns to dgdSubHist's columns
Set colDonHistAcctNum = dgdDonHist.Columns(0)
Set colDonYear = dgdDonHist.Columns(1)
Set colDonAmt = dgdDonHist.Columns(2)
Set colDonPostDate = dgdDonHist.Columns(3)

'Changes captions
colDonYear.Caption = "Year"
colDonAmt.Caption = "Amount"
colDonPostDate.Caption = "Post Date"

'Changes column widths
colDonYear.Width = 705
colDonAmt.Width = 1200
colDonPostDate.Width = 1005

I want to format the colDonAmt column (Columns(2)) to display a currecy value. Does anyone know how I can accomplish this?

Thank you in advance for any advice.

Timoteo
 
LostInCode,

Thanks for the help. I did not realize it would be so simple.

Timoteo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top