Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
Create dynamic properties and show them in ultratree as columns
posted

Hello,

It is needed that an user can create a query, but its not possible to know what the user wants to see (so his/hers select statement).  

So a colleaque of mine came up with an solution, dynamic properties. I have created a class that overides from PropertyDescriptor and implemented the methods, next i extended my dataclass with ICustomTypeDescriptor and implemented most of the methods here. In the GetProperties(Attribute attributes) method it first loops through the default excisting properties, next for testing purposes it will create a "Fake" property with some random data. When i debug through this, the data is being set correctly. But in the tree, only the first value is being shown. So when i use for example a random object that generates a value between 0 and 100 and the first value is 48. It will always show for every row 48 instead of the other values.

Can someone please help me with this, spend to much time on this problem and cant figure it out, neither can me colleague.

Thank you