Datagrid - format

V

VIswanathan S

Hi All!

I want to display the currency symbol in the datagrid for all the rows of
the salary (currency) field. How to do this?

'This is my sample code

Dim cm As New OleDbCommand
Dim da1 As New OleDbDataAdapter
Dim ds1 As New DataSet
Try
cm.CommandText = "select distinct d.dept_name as deptname ,sum
(e.salary) as salary from department d ,employee e where
d.dept_id=e.dept_id group by d.dept_name"
cm.Connection = Con
da1.SelectCommand = cm
da1.Fill(ds1, "employee")
dg.DataSource = ds1.Tables("employee")
Catch ex As Exception
MsgBox(ex.Message)
End Try

TIA
Viswanathan S
 
G

Guest

Create your own column formats for items (using bound columns, etc.). If you
are using Visual Studio, right click the grid and choose property builder to
get a GUI for this.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

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