ExpressionField problem
Hello,
I have a problem regarding the ExpressionField property of a QueryColumnListItem within the ValidateContextMenu event. I am using version 2.9.5.703 of ActiveQueryBuilder and I am trying to customize the context menu. I need the FieldType (via QueryColumnListItem.ExpressionField.FieldType) of the selected QueryColumnListItem in order to add custom functionality. But sometimes the ExpressionField is null and I do not get the field type. As far as i can see it, this happens when a database column is displayed in the QueryColumnListControl but should not be selected in the query (item is not checked) and/or if you use SQL functions (i.e. concatenation). Previously we used version 2.1.0.533 and ExpressionField always had a value, so we always had a field type. Is this a bug or did you change the behaviour of a QueryColumnListItem and I need to find another way to get the field type?
Kind regards
Christian Sack
I have a problem regarding the ExpressionField property of a QueryColumnListItem within the ValidateContextMenu event. I am using version 2.9.5.703 of ActiveQueryBuilder and I am trying to customize the context menu. I need the FieldType (via QueryColumnListItem.ExpressionField.FieldType) of the selected QueryColumnListItem in order to add custom functionality. But sometimes the ExpressionField is null and I do not get the field type. As far as i can see it, this happens when a database column is displayed in the QueryColumnListControl but should not be selected in the query (item is not checked) and/or if you use SQL functions (i.e. concatenation). Previously we used version 2.1.0.533 and ExpressionField always had a value, so we always had a field type. Is this a bug or did you change the behaviour of a QueryColumnListItem and I need to find another way to get the field type?
Kind regards
Christian Sack
ExpressionField should not be null if item is not selected for output, we will check this problem and let you know about results. But it's true that the ExpressionField is null when item is SQL expression, this is by design. Active Query Builder is not capable to calculate the result data type of SQL expressions.