473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to format values in datagrid/dataset

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
1 1857
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter | last post by:
I have a datagrid on WinForm and I am trying to format the Grid. I am using the following code, the code runs fine, but nothing happens after it runs, the datagrid does not change (with data in the...
10
by: ruca | last post by:
Hi I want to format some columns of my DataGrid control. Example, one of my fields of DataSet is a DATE field and in BD he is Ok, but when I show him in datagrid he comes with hours too. I...
4
by: Vik | last post by:
How can I display the lookup values in a datagrid? E.g., the datagrid displays a table that contains a ProductID field. I want to display a Product description from a Product table in that...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
4
by: sivashankar | last post by:
hello experts.... -i'm having a datagrid with 10 columns and 4 rows and one submit button. -the fields are eno,ename,eid,and 4 check boxes -after entering values when i clik the submit button...
7
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from...
3
by: dbuchanan | last post by:
Hello, (Windows forms - SQL Server) I fill my datagrid with a stored procedure that includes relationships to lookup tables so that users can see the values of the combobox selections rather...
8
by: stephen | last post by:
Hi, I make use of properties to store values that are relevant to the page but this time I am posting the page to itself and the values are Zero or null (they disappear). is there any other way...
1
by: differentsri | last post by:
THIS IS AN ASP.NET 1.1 APPLICATION IAM TRYING TO UPDATE THE FIELD BUT I AM NOT ABLE TO UPDATE IT? CAN U TELL THE REASON ? IT IS GIVING THE FOLLOWING ERROR BELOW I HAVE ALSO GIVEN THE CODE OF...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.