Datagrid - format

  • Thread starter Thread starter VIswanathan S
  • Start date Start date
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
 
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!
***************************
 
Back
Top