HomeActive Query BuilderProgrammatically assign a type to a complex expression

Programmatically assign a type to a complex expression


Hello,

I am using criteriaItem.ExpressionField.FieldType property to detect data type. However, for some fields, I am building complex expressions wrapping them and, consequently, I lose the information in the ExpressionField property which become Null in these cases.

At runtime, I do know what data type a complex expression should have, but ExpressionField is a read-only property. Is there a way for me to set the data type of this expressions through code?

Regards,
Vicente Almagro
Vicente Almagro | email
June 6 2011, 07:37 AM
Dear Vincente,

As far as I understand, you need this information to use in some other place (as the component itself doesn't need it). Possibly you may calcuate the field type when you really need this information.

Further explanation of your task may help us to suggest a better way to cope with it.
Sergey Smagin | email
1 day, 6 hours since original post
I was trying to add some predifined filters through the context menu of the criteria cells, and by doing this I was losing the information in the ExpressionField property.

Anyway, I have been thinking it over and calculating the field type out of the component is good enough for me.

Thanks for your help, Sergey.
Vicente Almagro
Vicente Almagro | email
2 days, 22 hours since original post
This topic is closed