<?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 : PropertyGrid Dirty</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : PropertyGrid Dirty]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 24 May 2026 17:06:06 +0000</pubDate>
  <lastBuildDate>Thu, 27 Mar 2008 15:15:16 +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=9947</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[PropertyGrid Dirty : Hi,   You don&amp;#039;t have to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32654&amp;title=propertygrid-dirty#32654</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 27 March 2008 at 3:15pm<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>You don't have to add an inplaceButton just set Item.Flags = ItemHasComboButton. </DIV>]]>
   </description>
   <pubDate>Thu, 27 Mar 2008 15:15:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32654&amp;title=propertygrid-dirty#32654</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : If you use PropertyGridItemString,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32647&amp;title=propertygrid-dirty#32647</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2531">Baldur</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 27 March 2008 at 12:03pm<br /><br />If you use PropertyGridItemString, you have to add an inplacebutton with Id 101 for dropdownbutton.<DIV>In Changing-Event you can check against the constaints and if false set cancel to true.</DIV>]]>
   </description>
   <pubDate>Thu, 27 Mar 2008 12:03:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32647&amp;title=propertygrid-dirty#32647</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : Hi Aaron,Thanks for your help....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32546&amp;title=propertygrid-dirty#32546</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 25 March 2008 at 9:48am<br /><br />Hi Aaron,<br><br>Thanks for your help. I'm not sure that I can get things to work the way that I want with your code when using PropertyGridItemString because the constraints don't seem to work (nor does the drop-down appears).<br><br>I have a PropertyGridItem that needs to show Yes/No in a drop-down. Using the PropertyGridItemBoolean would be ideal here, but it only seems to show True/False. So I use a PropertyGridItemEnum and set constraints for 0 = No, -1 = Yes. I've tried using constraints with PropertyGridItemString and PropertyGridItemBool, but they don't seem to do anything for those item types. You mention that you got the PropertyGrid to show constraints for the "string" type...how did you do it? (NOTE: I am now beta testing v12, so maybe it is a problem with the new version?).<br><br>In any case, it seems to me that the PropertyGridItemEnum type should return its underlying value for the DefaultValue property and *not* the constraint caption, since that is purely cosmetic. What do you think?<br><br><br><br>]]>
   </description>
   <pubDate>Tue, 25 Mar 2008 09:48:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32546&amp;title=propertygrid-dirty#32546</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : Hi,   In thetestI used PropertyGridItemString...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32496&amp;title=propertygrid-dirty#32496</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 24 March 2008 at 4:08am<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>In the&nbsp;test&nbsp;I used PropertyGridItemString <strong>and not</strong> PropertyGridItemEnum, I did add some constraints to the PropertyGridItemString. In this&nbsp;case&nbsp;you are able to compare the Item.DefaultValue&nbsp;with the Item.Value&nbsp;&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 24 Mar 2008 04:08:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32496&amp;title=propertygrid-dirty#32496</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : Hi,   You could try this:  In...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32491&amp;title=propertygrid-dirty#32491</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 24 March 2008 at 1:38am<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>You could try this:</DIV><DIV>&nbsp;</DIV><DIV>In the ValueChanged event: </DIV><DIV>&nbsp;</DIV><DIV>If CStr(Item.Value) &lt;&gt; CStr(Item.DefaultValue) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.ValueMetrics.ForeColor = vbRed 'value changed <BR>Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.ValueMetrics.ForeColor = vbGreen 'value changed into default value back again<BR>End If</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Iterate through the items:</DIV><DIV>&nbsp;</DIV><DIV>Dim propItem As PropertyGridItem<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; For Each propItem In wndPropertyGrid.Categories(1).Childs(1).Childs<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case propItem.ValueMetrics.ForeColor<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case vbRed: MsgBox "Value changed..."<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case vbGreen: MsgBox "Value changed back to original..."<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case Else: MsgBox "Value never changed..."<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select<BR>&nbsp;&nbsp;&nbsp; Next propItem</DIV><DIV>&nbsp;</DIV><DIV>Test with checkbox,string and enum, the other items you have to check yourself</DIV>]]>
   </description>
   <pubDate>Mon, 24 Mar 2008 01:38:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32491&amp;title=propertygrid-dirty#32491</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : Hi Aaron,Thanks for replying....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32486&amp;title=propertygrid-dirty#32486</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 23 March 2008 at 5:08pm<br /><br />Hi Aaron,<br><br>Thanks for replying. I have the HighlighChangedItems property set already, I'm trying to determine if anything has changed programatically to decide whether or not to restart my server application. If the user hasn't changed any settings, then I'll just leave everything running as is. I guess I was just hoping that CJ would expose whatever they are using to highlight the changed items as a property for each item so we can test for changes.<br>]]>
   </description>
   <pubDate>Sun, 23 Mar 2008 17:08:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32486&amp;title=propertygrid-dirty#32486</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : Hi,  If you set: wndPropertyGrid.HighlightChangedItems...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32485&amp;title=propertygrid-dirty#32485</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 23 March 2008 at 4:44pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>If you set: &nbsp;wndPropertyGrid.HighlightChangedItems = True </DIV><DIV>the changed values will be highlighted</DIV>]]>
   </description>
   <pubDate>Sun, 23 Mar 2008 16:44:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32485&amp;title=propertygrid-dirty#32485</guid>
  </item> 
  <item>
   <title><![CDATA[PropertyGrid Dirty : Is there an easy way to programmatically...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32477&amp;title=propertygrid-dirty#32477</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 9947<br /><strong>Posted:</strong> 23 March 2008 at 12:12pm<br /><br />Is there an easy way to programmatically tell any PropertyGrid items have been modified by the user (for example, a Dirty property)?<br><br>I've tried comparing the DefaultValue to the Value property, but in the case of Enums, the DefaultValue returns the translated label for the enum, while the Value property returns the actual value of the enum. The other option is to store the original value of each child item and then compare, but this is tedious when you have a long list of items.<br><br>If a Dirty property could be added, that would be great. Also of use would be an OriginalValue property for each item.<br><br>Thanks.<br>]]>
   </description>
   <pubDate>Sun, 23 Mar 2008 12:12:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9947&amp;PID=32477&amp;title=propertygrid-dirty#32477</guid>
  </item> 
 </channel>
</rss>