By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,697 Members | 1,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,697 IT Pros & Developers. It's quick & easy.

How to format values in datagrid/dataset

P: n/a
I have added a new column to a typed dataset which displays an expression
which is the result of one double (data type) field divided by another
double field. I would like format this column to show the number as a whole
number percentage, like 67 instead of as, say, .666666666667.

Is there a place in the expression or a dataset column property or a
datagrid
property twhere I can use the Format() function or some other way to specify
the format I would like?

Seems as though express columns may be read only which makes this even more
interesting.

I am looking for an answer other that using the data adapter's SQL Select
statement which populates the dataset in the first place.
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In order to convert my column to to percent the best I have come up with so
far is to multiply it's expression *100 and to set it's type to Integer.
This is not an elegant solution.

"George Yachán" <2m*******@wherever.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I have added a new column to a typed dataset which displays an expression
which is the result of one double (data type) field divided by another
double field. I would like format this column to show the number as a
whole
number percentage, like 67 instead of as, say, .666666666667.

Is there a place in the expression or a dataset column property or a
datagrid
property twhere I can use the Format() function or some other way to
specify
the format I would like?

Seems as though express columns may be read only which makes this even
more interesting.

I am looking for an answer other that using the data adapter's SQL Select
statement which populates the dataset in the first place.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.