Topic: Add a Column to Grid which has not a table in database!

Hi,
I just want to have a column in Grid without having a table in database!
this column will show values from sum of three of other rows in another column in same grid!

some Example:

             column1 | column2 | VirtualColumn |

row1    10              20               sum of 1 and 2 = 30
row2    -10             40               sum of 1 and 2 and top virtual grid = 60
.
.
.
row    10                20                 sum of 1 and 2 and top virtual grid = x

is there any way?!

Thanks a lot and have a lovely day

2 (edited by derek 2019-09-13 09:41:35)

Re: Add a Column to Grid which has not a table in database!

Hi,
If I understand your question, perhaps you could use a calculated field (please see attached example).
Regards,
Derek.

Post's attachments

Attachment icon virtualcolumn.zip 336.26 kb, 299 downloads since 2019-09-13 

Re: Add a Column to Grid which has not a table in database!

Thanks a lot,
yep its exactly what I need, Just another question!
My columns in database are not integer! is total(a.columnname0 work with currency type too?!

Thanks a lot again

Re: Add a Column to Grid which has not a table in database!

Hi,
Yes, it should still work.
However, you might want to force the calculated field to always show to 2 decimal places, in which case you could alter the calculated field format with the 'printf' command (please see attached).
Derek.

Post's attachments

Attachment icon virtualcolumn.zip 336.06 kb, 358 downloads since 2019-09-13 

Re: Add a Column to Grid which has not a table in database!

many many Thakns,
Its worked smile