Print Page | Close Window

How to truely identify an item?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=1358
Printed Date: 23 November 2024 at 9:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to truely identify an item?
Posted By: JSram
Subject: How to truely identify an item?
Date 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?



Replies:
Posted By: SuperMario
Date Posted: 05 November 2004 at 2:29pm
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.


Posted By: JSram
Date Posted: 09 November 2004 at 4:06pm
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...


Posted By: SuperMario
Date Posted: 10 November 2004 at 10:05am
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.


Posted By: JSram
Date Posted: 10 November 2004 at 10:25am
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.




Posted By: SuperMario
Date Posted: 10 November 2004 at 10:46am
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.


Posted By: JSram
Date Posted: 10 November 2004 at 11:00am
:-( 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


Posted By: Gutauckis
Date Posted: 20 December 2004 at 1:37pm
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?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net