the structural data of additional columns assigned to an expressionhandle can be accessed by ExpressionHandle.Columns. But how to get the corresponding column values of all rows of an expressionhandle by code?
The ExpressionHandle.Element property seems to provide the model based properties only.
Alois
You need to add a CurrencyManagerHandle and set it's ReferenceHandle to the ExpressionHandle.
The CurrencyManager then points to the current row of the expression handle and you can cycle through from that using the Currency Managers position property.
Nick
The problem is not to iterate over all rows but to get access to the values of those columns that are additionally connected to the expressionhandle and are not original attributes of the underlying UML-class.
PropertyDescriptorCollection descriptorCol = (rhQuery as ITypedList).GetItemProperties(null); foreach (Object oObj in rhQuery) { foreach (PropertyDescriptor oPd in descriptorCol) { ...oPD.Name; ...oPd.GetValue(oObj).ToString();
Thanks to Jan, who posted this solution some years ago in the former Borland.eco.newsgroup.
Note: If using a CurrencyManagerHandle instead of its RootHandle you don't get the additional columns!