How to truely identify an item? |
Post Reply |
Author | |
JSram
Groupie Joined: 22 October 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
Posted: 02 November 2004 at 9:52am |
Hi,
I like the property grid but as far as I can see it lacks a way to truley identify an Item in the ValueChanged Event, without writing a workaround code, or have I missed something? There is the Caption which in the example codes are used much as a Collection Key, but that is not a satisfying solution if writing multilanguge code. The Caption value will obviously change depending on langue used. The only way I can see now is to create an Enum for the grid marking up each item in the tag property, but then you lose the posibility to store extra data. Although it feels like a more robust solution that the checking on the caption agains an language dependant string valiable. Can we expect to see some improvements on this to the next version? |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I see no way to do this as well. I would like to see an ID
property added just like CommandBar controls. Submit this to
IssueTrack so development can see this.
|
|
JSram
Groupie Joined: 22 October 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
|
Sorry, I been away for a while...
This was one of the very first things I noticed after I had purshased the Xtream suite, and I sent in a feature request report on it, but never got any feedback on it... and then went on diving into the other parts of the suite to return later with more knowledge about it. Unfortunately, I found more knowledge didn't help I hope my report was acknowledged after all and something is done about it to the next release, and I hope it's in good time before christmas or I can't release my own app and loose bucks It would be a nice gesture by codejock to give some feedback when giving in a report as else you don't feel so motivated next time... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Good news! The ID property has been added for
PropertyGridItems. This will now work just like when you assign
and ID to the controls in the CommandBars. The FindItem method
(already included) will allow you to easily find the PropertyGridItems
by ID.
|
|
JSram
Groupie Joined: 22 October 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
|
Yes that was good news, thanks, and when (approx.) can we expect to start enjoying this?
An other thing as well, I feel the constrains kind of suffer from the same problem, will they also have an ID or at least an index? A tag property would also be good as sometime you may like to filter the collection shown depending on something else, and then an index wouldn't be of much help as it wouldn't be consistent so you need to set a fixed value to check agains. The value as such is not always good to check against as it changes if your app is multilingual. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Sorry, not sure on a release date.
No, constraints did not get an ID. I've had that question before and was told that you need to create something like a "Select" statement keyed on the text of the item constraints. Then you could associate data with the different items. I know this isn't much help in a multi-language program. But there is a workaround, you can search by ID for the item that has the constraints, then you can clear the constraints and add new ones with the current language. |
|
JSram
Groupie Joined: 22 October 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
|
:-( I'm no big fan of workarounds, I like properly equipped
controls. I consider that part inconsistent as a combo box should
have an index as minimum. There is a better workaround though, although
it affect the appearance a bit, "enum" each constrain like "1-First
Item", "2-Second Item" etc. and then read it iResult =
Val(Left$(sConstraint,1) ), but this doesn't work currently as there is
no way to checkthe identity of the Parent.
But ok, the good thing is I can prepare my code for this now - and have it work later |
|
Gutauckis
Newbie Joined: 06 December 2004 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Don't want to be a pain but do want to stress the importance of getting
the next update. I need to be able to use the ID as well for the
griditem... Any word on when we can have the new control?
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |