Hi
If I have the following SQL:
I can expect the following output:
I'd like to replicate this in a GridCalculatedColumn and this is what I came up with:
Unfortunately, the rows I get contain zeros for their values as does the footer item, like:
"Bob" and "Alice" are of database type INT. Working with INTs will not work though.
What am I doing wrong?
Richard
If I have the following SQL:
SELECT
CAST
(
(
CAST
(10549
AS
FLOAT
) /
CAST
(93020
AS
FLOAT
) * 100
)
AS
DECIMAL
(10,2)
)
AS
BobsPerAlice
I can expect the following output:
BobsPerAlice
11.34
I'd like to replicate this in a GridCalculatedColumn and this is what I came up with:
<
telerik:GridCalculatedColumn
DataType
=
"System.Double"
HeaderText
=
"Bobs"
UniqueName
=
"Bobs"
DataFields
=
"Bobs, Alice"
Expression
=
"{0} / {1} * 100"
FooterText
=
"Bobs / Alice: "
Aggregate
=
"Sum"
>
</
telerik:GridCalculatedColumn
>
Unfortunately, the rows I get contain zeros for their values as does the footer item, like:
Bobs
0
0
0
...
Bobs / Alice: 0
"Bob" and "Alice" are of database type INT. Working with INTs will not work though.
What am I doing wrong?
Richard