PC Review


Reply
Thread Tools Rate Thread

DataSet Expression Question

 
 
Sammy
Guest
Posts: n/a
 
      19th May 2004
Is there a way to use the expression property for a datacolumn to specify
the number of digits after the decimal place? Is there another way of doing
this without having to code it myself?

Thanks


 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      19th May 2004
You can use a DataGridTableSytle and then use the DataGridColumnStyle to
specify the format of the column. This is done totally independent of the
Expression property

http://tek-tips.com/gviewthread.cfm/pid/732/qid/835262

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
"Sammy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there a way to use the expression property for a datacolumn to specify
> the number of digits after the decimal place? Is there another way of

doing
> this without having to code it myself?
>
> Thanks
>
>



 
Reply With Quote
 
Sammy
Guest
Posts: n/a
 
      19th May 2004
This is not to show to user in a datagrid but rather to persist in the db.
So, I was looking for a way to round the "double" value to hold 3 decimal
places without having to use the Math class.

Thanks

"William Ryan eMVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You can use a DataGridTableSytle and then use the DataGridColumnStyle to
> specify the format of the column. This is done totally independent of the
> Expression property
>
> http://tek-tips.com/gviewthread.cfm/pid/732/qid/835262
>
> --
>
> W.G. Ryan, eMVP
>
> http://forums.devbuzz.com/
> http://www.knowdotnet.com/williamryan.html
> http://www.msmvps.com/WilliamRyan/
> "Sammy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is there a way to use the expression property for a datacolumn to

specify
> > the number of digits after the decimal place? Is there another way of

> doing
> > this without having to code it myself?
> >
> > Thanks
> >
> >

>
>



 
Reply With Quote
 
=?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
Guest
Posts: n/a
 
      20th May 2004
Hi, Samm

I don't think that you can achieve this with expressions. DataColumn's Expressions only have some simple functionalities
So you can do either:
change the SQL code to convert the original data to the decimal value you want
or
do the manual computing using math functions.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSet.Merge and Column.Expression tomb Microsoft ADO .NET 3 20th May 2005 01:00 AM
Dataset: expression columns recalculation Hugo Batista Microsoft ADO .NET 2 5th Apr 2005 12:27 PM
DataSet.Merge with Column.Expression. expression not =?Utf-8?B?R2llZHJpdXM=?= Microsoft ADO .NET 4 12th Jan 2005 09:45 AM
Serialization of Dataset w/ Expression Column(s) Dan Microsoft C# .NET 1 20th Jul 2004 10:09 AM
dataset column expression Gary Microsoft ADO .NET 4 17th Oct 2003 11:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.