Hi,
I have two GridDateTimeColumns in a telerik grid--one the start date and other the End date. Now I want a 3rd column which would calculate the difference between the 2 columns.
I get the following error:
Cannot perform '-' operation on System.DateTime and System.DateTime.
What parameters should I be using in the Expression attribute to achieve this? any ideas?
Thanks,
Ketan
I have two GridDateTimeColumns in a telerik grid--one the start date and other the End date. Now I want a 3rd column which would calculate the difference between the 2 columns.
<telerik:GridCalculatedColumn Aggregate="Custom" DataType="System.TimeSpan" DataFields="DATE_EXPIRED,TRIAL_REQUEST_DATE" Expression="{0}-{1}" UniqueName="column"></telerik:GridCalculatedColumn> |
<telerik:GridDateTimeColumn DataField="DATE_EXPIRED" DataFormatString="{0:d}" HeaderText="Expired" UniqueName="DATE_EXPIRED" ></telerik:GridDateTimeColumn> |
<telerik:GridBoundColumn DataField="TRIAL_REQUEST_DATE" HeaderText="Requested" SortExpression="TRIAL_REQUEST_DATE" DataFormatString="{0:d}" UniqueName="TRIAL_REQUEST_DATE"> |
</telerik:GridBoundColumn> |
I get the following error:
Cannot perform '-' operation on System.DateTime and System.DateTime.
What parameters should I be using in the Expression attribute to achieve this? any ideas?
Thanks,
Ketan