This is a migrated thread and some comments may be shown as answers.

GridCalculatedColumn

4 Answers 551 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Samantha
Top achievements
Rank 1
Samantha asked on 24 Sep 2008, 07:36 AM

I would like to know more about the GridCalculatedColumn.  Is the calculated result will only be shown after the Add button is clicked?

below is the code for my GridCalculatedColumn.  my calculated result is the AcquisitionCost - NetBookValue.  What should i put in the Expression?

<

telerik:GridCalculatedColumn DataFields ="AcquisitionCost, NetBookValue" DataType ="System.Decimal" UniqueName ="AccumDeprectn" Aggregate="Sum" DataFormatString ="{0:N2}" Expression ="{5}-{7}"></telerik:GridCalculatedColumn>

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Sep 2008, 08:18 AM
Hello Samantha,

Try setting the Expression property for the GridCalculatedColumn as shown below.
aspx:
<telerik:GridCalculatedColumn DataFields ="AcquisitionCost, NetBookValue" DataType ="System.Decimal" UniqueName ="AccumDeprectn" Aggregate="Sum" DataFormatString ="{0:N2}" Expression ="{0}-{1}"
</telerik:GridCalculatedColumn> 

Thanks
Princy
0
Daniel
Telerik team
answered on 24 Sep 2008, 08:27 AM
Hello Samantha,

Please take a look at the links below:

Documentation: RadGrid column types

Online demo: RadGrid calculated columns

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Samantha
Top achievements
Rank 1
answered on 25 Sep 2008, 01:46 AM
Hi Daniel,

i have read the GridCalculatedColumn link that you gave.  I find that the "Total Price" field is not auto filled after i fill in the "Units in Stock".  Is the "Total Price" will only be filled after i click the "add" button?  but i could not find the add button in the Grid..

i have tried by clicking the PostBack button after i filled in everything includes "Unit Price" and "Units in Stock", but there is still nothing filled in the "Total Price".

so actually how does it work?

Thanks & Regards,
Samantha Kho
0
Daniel
Telerik team
answered on 26 Sep 2008, 01:57 PM
Hello Samantha,

I tried to reproduce the mentioned behavior without avail. Could you please check the attached demo website and let us know if you experience any unusual issues.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Samantha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Daniel
Telerik team
Samantha
Top achievements
Rank 1
Share this question
or