When i populate the gant control, i am using the UserIntegerReference property to hold the primary key value for each database record that i add to the control. As each timebar record is added to the gant, i also record the value in a cursor with its “current dates”.
When a user moves or resizes a timebar, how do I determine the UserIntegerReference value of the selected timebar? I need to take that value and lookup the assigned “UserIntegerReference” value in my database, in order to perform some validations and to show additional data.
In the OnValueChangedGantTime method, I want to use this “UserIntegerReference” to perform the lookup. But i am missing the obvious. Can you help?
The OnValueChangedGantTime gives you a parameter named theDataEntity, of the type IphdataEntity_GantTime.
If you store your db-key in the UserIntegerReference you can access it with theDataEntity.UserIntegerReference.
If you stored the key in the tree nodes UserIntegerReference you can access it like this:
((theDataEntity as IphDataEntity_GantTime2).Row as IphGantRow3).TreeNode.UserIntegerReference