DataColumn.Expression

  • Thread starter Thread starter Rodrigo
  • Start date Start date
R

Rodrigo

Hi all. I need to build a DataColumn with an expression
like this:

MyColumn.Expression = "Customer.Name + Find( Child
(Customer2Orders).OrderType =1)).Text"


Sure it´s dosen´t work. I need a way to find something
in a collection (a child table).
In my sample, what a wanna do is create a DataColumn
that is a concatanation of a field <Customer.Name> with
the <Order.Text> field of its order child that has the
<OrderType> field = 1.

Does anyone has any idea if there is way to do that?

Thanks,
 
Rodrigo:

I'm not 100% sure but I don't believe the expression column syntax supports
find.
However, I think you can Declare a string = to the find part and then append
it in the expression.

string s = Find( Child
(Customer2Orders).OrderType =1)).Text;

MyColumn.Expression = "Customer.Name +" + s;
Hi all. I need to build a DataColumn with an expression
like this:

MyColumn.Expression = "Customer.Name + Find( Child
(Customer2Orders).OrderType =1)).Text"


Sure it´s dosen´t work. I need a way to find something
in a collection (a child table).
In my sample, what a wanna do is create a DataColumn
that is a concatanation of a field <Customer.Name> with
the <Order.Text> field of its order child that has the
<OrderType> field = 1.

Does anyone has any idea if there is way to do that?

Thanks,
 
Back
Top