<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : C&#111;nstraint Index</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : C&#111;nstraint Index]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 24 May 2026 14:32:48 +0000</pubDate>
  <lastBuildDate>Thu, 24 Feb 2005 04:30:02 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=969</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[C&#111;nstraint Index : Use PropertyItemEnum type (see...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=5341&amp;title=constraint-index#5341</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 969<br /><strong>Posted:</strong> 24 February 2005 at 4:30am<br /><br />Use PropertyItemEnum type (see sample)]]>
   </description>
   <pubDate>Thu, 24 Feb 2005 04:30:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=5341&amp;title=constraint-index#5341</guid>
  </item> 
  <item>
   <title><![CDATA[C&#111;nstraint Index : thanks supermario is the item.selectedconstraint...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=5331&amp;title=constraint-index#5331</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=280">ianp</a><br /><strong>Subject:</strong> 969<br /><strong>Posted:</strong> 24 February 2005 at 1:51am<br /><br /><P>thanks supermario</P><P>is the item.selectedconstraint property included? I couldn't see it...</P>]]>
   </description>
   <pubDate>Thu, 24 Feb 2005 01:51:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=5331&amp;title=constraint-index#5331</guid>
  </item> 
  <item>
   <title><![CDATA[C&#111;nstraint Index : This functionality is now included...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=5313&amp;title=constraint-index#5313</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 969<br /><strong>Posted:</strong> 23 February 2005 at 1:04pm<br /><br />This functionality is now included (Version 9.60)&nbsp;<img src="http://forum.codejock.com/smileys/smiley1.gif" border="0">]]>
   </description>
   <pubDate>Wed, 23 Feb 2005 13:04:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=5313&amp;title=constraint-index#5313</guid>
  </item> 
  <item>
   <title><![CDATA[C&#111;nstraint Index : Any chance this can be implemented...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=3580&amp;title=constraint-index#3580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=280">ianp</a><br /><strong>Subject:</strong> 969<br /><strong>Posted:</strong> 20 October 2004 at 10:56am<br /><br />Any chance this can be implemented soon? ]]>
   </description>
   <pubDate>Wed, 20 Oct 2004 10:56:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=3580&amp;title=constraint-index#3580</guid>
  </item> 
  <item>
   <title><![CDATA[C&#111;nstraint Index : I&amp;#039;ve just read the version...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=2562&amp;title=constraint-index#2562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=280">ianp</a><br /><strong>Subject:</strong> 969<br /><strong>Posted:</strong> 23 July 2004 at 3:38am<br /><br /><P>I've just read the version 9.0 release notes and&nbsp;this functionality&nbsp;is (partially?) included in the MFC version</P><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> ...</DIV><DIV>3. CXTPItemConstraints::GetCurrent returned </DIV><DIV> 4.CXTPPropertyGridItem::SetitemData/CXTPPropertyGridItem::Ge tItemData added</DIV><DIV>...</td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>What are the chances of having these in the next ActiveX version?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 23 Jul 2004 03:38:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=2562&amp;title=constraint-index#2562</guid>
  </item> 
  <item>
   <title><![CDATA[C&#111;nstraint Index : Currently I am creating a constrained...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=2555&amp;title=constraint-index#2555</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=280">ianp</a><br /><strong>Subject:</strong> 969<br /><strong>Posted:</strong> 22 July 2004 at 5:10am<br /><br /><P>Currently I am creating a constrained item from a adodb recordset which contains a primary key field and a descriptive text field. I would like the user to select a value for the property using the descriptive text field, but use the primary key in my code.</P><P>Using a standard VB.ComboBox, I would add an item using the descriptive field in the recordset and then set the ItemData using the Primary Key field.</P><P>However, with the PropertyGrid I need to work around the fact that an item constraint only has an Index and Caption property, it does not have an "ItemData" property.</P><P>Here's what I'm doing (I've taken the recordset out of the code for simplicity):</P><P><table width="99%"><tr><td><pre class="BBcode">Option Explicit<BR>Dim m_OS() As Long</P><P>Private Sub Form_Load()<BR>Dim pgC As XtremePropertyGrid.PropertyGridItem<BR>Dim pgI As XtremePropertyGrid.PropertyGridItem<BR>&nbsp; With Me.PropertyGrid1<BR>&nbsp;&nbsp;&nbsp; Set pgC = .AddCategory("test")<BR>&nbsp;&nbsp;&nbsp; pgC.Expanded = True<BR>&nbsp;&nbsp;&nbsp; Set pgI = pgC.AddChildItem(PropertyItemString, "prop", "1")<BR>&nbsp;&nbsp;&nbsp; Set pgI = Nothing<BR>&nbsp;&nbsp;&nbsp; Set pgI = pgC.AddChildItem(PropertyItemString, "Operating System", Null)<BR>&nbsp;&nbsp;&nbsp; pgI.ConstraintEdit = True<BR>&nbsp;&nbsp;&nbsp; pgI.Flags = ItemHasComboButton<BR>&nbsp;&nbsp;&nbsp; ' would usually be loaded from an adodb.recordset<BR>&nbsp;&nbsp;&nbsp; ReDim m_OS(3) As Long<BR>&nbsp;&nbsp;&nbsp; pgI.Constraints.Add "Windows XP": m_OS(1) = 3<BR>&nbsp;&nbsp;&nbsp; pgI.Constraints.Add "Windows 2000": m_OS(2) = 1<BR>&nbsp;&nbsp;&nbsp; pgI.Constraints.Add "Windows 98": m_OS(3) = 2<BR>&nbsp; End With<BR>End Sub</P><P>Private Sub PropertyGrid1_ValueChanged(ByVal Item As XtremePropertyGrid.IPropertyGridItem)<BR>Dim i As Long<BR>&nbsp; If Item.Caption = "Operating System" Then<BR>&nbsp;&nbsp;&nbsp; For i = 1 To Item.Constraints.Count<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Item.Constraints(i) = Item.Value Then MsgBox "Constraint Index is " &amp; i &amp; vbCrLf &amp; "Contraint Key is " &amp; m_OS(i): Exit For<BR>&nbsp;&nbsp;&nbsp; Next<BR>&nbsp; End If<BR>End Sub</pre></td></tr></table></P><P>Is there any way of, at the very least, exposing the index for the constraint selected e.g.<BR><table width="99%"><tr><td><pre class="BBcode">Item.Constraints("Windows 2000").Index&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' --&gt; which would return 2</pre></td></tr></table><BR>or, ideally, adding an ItemData (and/or Key) to the constraint? e.g.<BR><table width="99%"><tr><td><pre class="BBcode">' Add Constraints:<BR>Item.Constraints.Add "Windows XP", 3<BR>Item.Constraints.Add "Windows 2000", 1<BR>Item.Constraints.Add "Windows 98", 2<BR>' Read Constraints:<BR>Item.Constraints("Windows 2000").Index&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' --&gt; which would return 2<BR>Item.Constraints("Windows 2000").ItemData&nbsp;&nbsp;&nbsp; ' --&gt; which would return 1<BR>Item.Constraints(2).Caption&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' --&gt; which would return "Windows 2000"<BR>Item.Constraints(2).ItemData&nbsp;&nbsp;&nbsp;&nbsp;' --&gt; which would return 1</pre></td></tr></table></P><P>Better yet, be able to access an items selected constraint directly from the item e.g.<BR><table width="99%"><tr><td><pre class="BBcode">Item.SelectedConstraint.Index&nbsp;&nbsp; ' --&gt; which would return 2<BR>Item.SelectedConstraint.ItemData&nbsp;&nbsp; ' --&gt; which would return 1</pre></td></tr></table><BR><BR></P>]]>
   </description>
   <pubDate>Thu, 22 Jul 2004 05:10:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=969&amp;PID=2555&amp;title=constraint-index#2555</guid>
  </item> 
 </channel>
</rss>