I have the following in my Telerik Grid:
<telerik:GridCalculatedColumn HeaderText="Remark Code" DataFields="RemarkCodeID, RemarkCodeName" Expression='{0} + " - " + {1}' DataFormatString="{0:N}" ></telerik:GridCalculatedColumn>
I get an error that cannot convert an Int and RemarkCodeID is an int above. Is there a way I can convert RemarkCodeID to a string? Also, when I replace RemarkCodeID with a data field that is of type string, no error so I know it is RemarkCodeID that is causing the error.
Error:
System.ArgumentException: Expression of type 'System.Nullable`1[System.Int32]' cannot be used for parameter of type 'System.Object' of method 'System.String Concat(System.Object, System.Object)'
<telerik:GridCalculatedColumn HeaderText="Remark Code" DataFields="RemarkCodeID, RemarkCodeName" Expression='{0} + " - " + {1}' DataFormatString="{0:N}" ></telerik:GridCalculatedColumn>
I get an error that cannot convert an Int and RemarkCodeID is an int above. Is there a way I can convert RemarkCodeID to a string? Also, when I replace RemarkCodeID with a data field that is of type string, no error so I know it is RemarkCodeID that is causing the error.
Error:
System.ArgumentException: Expression of type 'System.Nullable`1[System.Int32]' cannot be used for parameter of type 'System.Object' of method 'System.String Concat(System.Object, System.Object)'