<?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 : Separating data from display</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : Separating data from display]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 12:25:53 +0000</pubDate>
  <lastBuildDate>Wed, 30 Jul 2008 08:12:43 +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=11631</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[Separating data from display : Tried that.But as it seems I would...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39165&amp;title=separating-data-from-display#39165</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3104">MacW</a><br /><strong>Subject:</strong> 11631<br /><strong>Posted:</strong> 30 July 2008 at 8:12am<br /><br />Tried that.<br><br>But as it seems I would have to override the OnSelect method in the PropertyGridItem.<br><br>But because of the way this method is designed and how it calls the Create and SetValue methods, I would need to duplicate the code in the base class. But this is not possible, because the base class relies on members declared as private to PropertyGridItem.<br><br>CJ calls SetValue before Create for the inline edit control. Which is wrong for my case. Since the edit control does not know to which item it belongs when SetValue is called, it cannot access the underlying data to access the real value.<br><br>But I cannot change this by overriding the OnSelect method because I cannot access the private members CJ uses to calculate the edit window position etc.<br>]]>
   </description>
   <pubDate>Wed, 30 Jul 2008 08:12:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39165&amp;title=separating-data-from-display#39165</guid>
  </item> 
  <item>
   <title><![CDATA[Separating data from display : Hi,If your using your own item...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39117&amp;title=separating-data-from-display#39117</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 11631<br /><strong>Posted:</strong> 29 July 2008 at 2:27pm<br /><br />Hi,<br><br>If your using your own item type, why not overwriting the corresponding virtual functions and store/get the data just before/after editing...<br>]]>
   </description>
   <pubDate>Tue, 29 Jul 2008 14:27:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39117&amp;title=separating-data-from-display#39117</guid>
  </item> 
  <item>
   <title><![CDATA[Separating data from display : Hi,thanks for the help. I have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39115&amp;title=separating-data-from-display#39115</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3104">MacW</a><br /><strong>Subject:</strong> 11631<br /><strong>Posted:</strong> 29 July 2008 at 2:12pm<br /><br />Hi,<br><br>thanks for the help. <br>I have my own PropertyGridItem class which can handle the 30+ different data types I support in my grid. The problem is only the mechanism in XTP which handles the "begin edit, end edit" cycle.<br><br>When the user clicks a field, the grid takes whatever value is stored inside the m_strValue member of the item. But this contains the formatted string value, which does not necessarily match the real value (e.g. "1234.00" vs. "1234.0054").<br><br>I need to somehow override this, to set the edit field from the original value in a potentially different format than the format I use when a field is just displayed. I see no way to do that because XTP uses the same variable to store the formatted display value and to set the edit field when the user begins to edit. Or do I overlook something here?<br>]]>
   </description>
   <pubDate>Tue, 29 Jul 2008 14:12:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39115&amp;title=separating-data-from-display#39115</guid>
  </item> 
  <item>
   <title><![CDATA[Separating data from display :  Hi;Im using CXTPPropertyGridItemDouble...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39091&amp;title=separating-data-from-display#39091</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 11631<br /><strong>Posted:</strong> 29 July 2008 at 9:29am<br /><br />Hi;<br><br>Im using CXTPPropertyGridItemDouble and call SetDoube()/GetDouble() functions. This works very well, because internally the data is really stored as a double value.<br>You can then work with format strings to change the display of the value.<br>]]>
   </description>
   <pubDate>Tue, 29 Jul 2008 09:29:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39091&amp;title=separating-data-from-display#39091</guid>
  </item> 
  <item>
   <title><![CDATA[Separating data from display : PS.: Using a custom in-place edit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39071&amp;title=separating-data-from-display#39071</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3104">MacW</a><br /><strong>Subject:</strong> 11631<br /><strong>Posted:</strong> 29 July 2008 at 6:55am<br /><br />PS.: Using a custom in-place edit does not help, because the XTP grid calls SetValue before it calls Create, so the edit control does not "know" about which item it belongs to when the SetValue call is made.<br>]]>
   </description>
   <pubDate>Tue, 29 Jul 2008 06:55:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39071&amp;title=separating-data-from-display#39071</guid>
  </item> 
  <item>
   <title><![CDATA[Separating data from display : Hi, I&amp;#039;d run into a problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39065&amp;title=separating-data-from-display#39065</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3104">MacW</a><br /><strong>Subject:</strong> 11631<br /><strong>Posted:</strong> 29 July 2008 at 5:53am<br /><br />Hi, <br><br>I'd run into a problem with the way the PropertyGrid handles the data storage and display.<br><br>For example, I have a value of type double with the value "1234.0056". I can format this as a string and use the SetValue method to display the value in the grid.<br><br>The problem is when I use the current users number format settings to format the string, which means that there are only two digits after the comma. The value will then show as "1234.00". When the user now clicks on the edit field to edit the value, this is what he can edit. The .0056 has been lost during the transition.<br><br>I keep the original value in a class so I still have access to the 1234.0056, but the way the PropertyGrid works (only SetValue/GetValue from string) does not allow me to hook into the edit cycle.<br><br>What I would need is a method which is called when the value of the edit field is about to be set:<br><br>virtual void &lt;SomeGridItem&gt;::SetEditText(strValue);<br><br>I then could either use the string handed over as the argument, or lookup the "real" value of the item and display this instead.<br><br>I looked into the current OnSelect method. I tried to override it, but it uses methods declared as private in the XTP GridItem class.<br><br>Is there a way to achieve that?<br><br>]]>
   </description>
   <pubDate>Tue, 29 Jul 2008 05:53:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11631&amp;PID=39065&amp;title=separating-data-from-display#39065</guid>
  </item> 
 </channel>
</rss>