How to format an unbound column in select statement of SQL in an UltraGrid?

Take this SQL statement
SELECT qty,cost,sell, (cost * qty) as 'Extended Sell'
using this statement, I am filling a datatable in .NET, then setting an Infragristics Ultragrid Datasource that datatable.

in my database, cost and sell are set as Decimal(x,2). when i see the value in the grid (the real value) it looks nice and neat, xx.xx HOWEVER on these unbound columns it is xx.xxxxxxxxxxxxx
I can set the format of that column in the datagrid so it displays great, however when you click on the cell and see the real value it has all those decimal places. How can I stop this?

Who is Participating?
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
SELECT qty,cost,sell, cast( (cost * qty) as decimal(15,2) )  as 'Extended Sell'
melegant99Author Commented:
See the little things that mean so much....
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.