<?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 : Checking for allowed values in propertygrid</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : Checking for allowed values in propertygrid]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 19:54:29 +0000</pubDate>
  <lastBuildDate>Fri, 14 Mar 2008 04:20:26 +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=9889</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[Checking for allowed values in propertygrid : Hi,  Thanks, looks like its...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9889&amp;PID=32252&amp;title=checking-for-allowed-values-in-propertygrid#32252</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9889<br /><strong>Posted:</strong> 14 March 2008 at 4:20am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Thanks, looks like its our bug. :(</DIV><DIV>&nbsp;</DIV><DIV>Please use ValueChanged instead:</DIV><DIV><BR>Private Sub PropertyGrid1_ValueChanged(ByVal Item As XtremePropertyGrid.IPropertyGridItem)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Item.Value &gt; 5 Then Item.Value = 5<BR>End Sub<BR></DIV>]]>
   </description>
   <pubDate>Fri, 14 Mar 2008 04:20:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9889&amp;PID=32252&amp;title=checking-for-allowed-values-in-propertygrid#32252</guid>
  </item> 
  <item>
   <title><![CDATA[Checking for allowed values in propertygrid :  The code below works when you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9889&amp;PID=32246&amp;title=checking-for-allowed-values-in-propertygrid#32246</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3351">wakerunner</a><br /><strong>Subject:</strong> 9889<br /><strong>Posted:</strong> 14 March 2008 at 1:23am<br /><br /><DIV></DIV><DIV>The code below works when you step through it 1 line at a time, however when you run the program it does not work. I am doing something wrong? Is there another/better way to chack values and correct if they are not an acceptable range? I am trying to make sure the entry is a number between 0 and 5.</DIV><DIV>&nbsp;</DIV><DIV>Private Sub PG1_AfterEdit(ByVal Item As XtremePropertyGrid.IPropertyGridItem, NewValue As String, Cancel As Boolean)</DIV><P>NewValue = Left$(Trim$(NewValue), 1)<BR>If Val(NewValue) = 0 Then NewValue = "0"</P><DIV>If Val(NewValue) &gt; 5 Then NewValue = "5"<BR>Item.Value = NewValue</DIV><P><BR>End Sub<BR></P>]]>
   </description>
   <pubDate>Fri, 14 Mar 2008 01:23:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9889&amp;PID=32246&amp;title=checking-for-allowed-values-in-propertygrid#32246</guid>
  </item> 
 </channel>
</rss>