Hi There,
I am using expression to define some special function for the format.
I have 2 questions:
1) my function is like
Public Class CustomExpressionContext
Inherits Telerik.Data.Expressions.ExpressionContext
Public Function formatAddress(ClientName As String, rawAdd As String) As String
rawAdd = rawAdd.Replace("{}", vbCrLf)
rawAdd = rawAdd.Replace("{lf}", ClientName & vbCrLf)
rawAdd = rawAdd.Replace(vbCrLf & vbCrLf, vbCrLf)
Return rawAdd
End Function
End Class
when I use ColumnRawAdd.expression = "formatAddress(AliasName, RawAddresses)" where ColumnRawAdd is the column for "RawAddresses"
I got exception like "RawAddresses is not defined in the context"
if I use a new column, and set newcolumn.expression = "formatAddress(AliasName, RawAddresses)"
then there is no problem. Is there something I need to set or check for ColumnRawAdd so I can use ColumnRawAdd for it?
2)newcolumn is working fine, but if I LoadLayout for alll the columns first, then define newcolumn.expression = "formatAddress(AliasName, RawAddresses)"
then the newcolumn is empty, without any exception. What should I do here to have newcolumn have value?
Thanks.
Ada