<?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 : Metrics Markup &amp; BeforeDrawRow</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Metrics Markup &amp; BeforeDrawRow]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 08:27:29 +0000</pubDate>
  <lastBuildDate>Sun, 19 Jul 2009 11:14:17 +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=14727</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[Metrics Markup &amp; BeforeDrawRow : OK, guys - I put markup in cell...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=51094&amp;title=metrics-markup-beforedrawrow#51094</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 19 July 2009 at 11:14am<br /><br />OK, guys - I put markup in cell work back as was fixed but with extra flag<DIV><FONT size=2><P>ReportControl.PaintManager.ForceDynamicMarkupForCell = True - to use Metric.Text and</P><DIV>ReportControl.PaintManager.ForceDynamicMarkupForCell =&nbsp;False&nbsp; - to use Item.Caption</DIV><DIV>&nbsp;</DIV><DIV>There is a&nbsp;problem in Markup component&nbsp;- it can't support markup inside markup so if you already have markup in caption and also apply extra markup in Metric.Text - it will not work. Choose 1st or 2nd way. Or you can try dynamically switch mode in OnBeforeDraw according your own logic</DIV></FONT></DIV>]]>
   </description>
   <pubDate>Sun, 19 Jul 2009 11:14:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=51094&amp;title=metrics-markup-beforedrawrow#51094</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow : ReportRecordItem::OnDrawCaptio...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50947&amp;title=metrics-markup-beforedrawrow#50947</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 14 July 2009 at 11:08am<br /><br /><P>ReportRecordItem::OnDrawCaption(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pMetrics)<BR>{<BR>&nbsp;ASSERT(pDrawArgs-&gt;pItem == this);</P><P>&nbsp;//THIS CONDITION - IsVirtualMode() &#091;Rev 7687 Oct 2008&#093; PREVENTS MARKUP in Non-Virtual mode<BR>&nbsp;// FIXED BACK! Only for virtual mode! Developer have to set Caption of Item to have markup</P><P>&nbsp;if (pDrawArgs-&gt;pControl-&gt;IsVirtualMode() &amp;&amp; pDrawArgs-&gt;pControl-&gt;GetMarkupContext() &amp;&amp; !m_pMarkupUIElement)<BR>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 14 Jul 2009 11:08:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50947&amp;title=metrics-markup-beforedrawrow#50947</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow :   mdoubson wrote: We already...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50935&amp;title=metrics-markup-beforedrawrow#50935</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 14 July 2009 at 4:31am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by mdoubson" alt="Originally posted by mdoubson" style="vertical-align: text-bottom;" /> <strong>mdoubson wrote:</strong><br /><br /><P>We already had this feature between 13.0 and official 13.1 where Oleg (who supports Markup) decided that this is proper way from efficiency point of view - use a parser for each subitem is too expenisive. He is right</P></td></tr></table> <DIV>&nbsp;</DIV><DIV>Hi,</DIV><DIV>&nbsp;</DIV><DIV><FONT size=3><strong>You are kidding, right? How can you say that? You said you fixed this and would be in V13.1</strong></FONT>&nbsp;, See post <a href="http://forum.codejock.com/forum_posts.asp?TID=13599" target="_blank">http://forum.codejock.com/forum_posts.asp?TID=13599</A>&nbsp;<FONT size=3><strong>and now it doesn't?</strong></FONT>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>What is&nbsp;<strong><EM>efficiency</EM></strong> in:&nbsp;"Oleg (who supports Markup) decided that this is proper way from <EM><strong>efficiency</strong></EM> point of view" ?&nbsp; (write: <strong><EM>efficiency</EM></strong>&nbsp;read:<EM><strong> convenient </strong></EM>???)</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>And to Oleg: Step up to the plate and define: proper way from <EM><strong>efficiency</strong></EM> point of view.</DIV><DIV><strong><EM></EM></strong>&nbsp;</DIV><DIV><strong><EM></EM></strong>&nbsp;</DIV><DIV>Markup for Metrics.Text is far out THE best implementation of Markup in ReportControl you <strong>ever</strong> did (<strong>Well in this case Andrei</strong>) just adding records with plain text and do magical stuff in&nbsp;BeforeDrawRow event. Strange that this worked&nbsp;(without any problems) in V12.1 and now, suddenly, it doesn't anymore (oh yeah, it wasn't efficient enough), major disappointment&nbsp;if this is CJ's way of implementing... I put alot of effort in creating test projects and discussions with you (and discussing issues with you, is already major task) and you also&nbsp;told me that it has been fixed for next release (to keep us quiet for while???)&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Thanks for nothing</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 14 Jul 2009 04:31:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50935&amp;title=metrics-markup-beforedrawrow#50935</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow : Well, I think it would be a very...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50926&amp;title=metrics-markup-beforedrawrow#50926</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 13 July 2009 at 5:58pm<br /><br />Well, I think it would be a very useful feature to have dynamic display-only markup while allowing for plain-text user edits, so let me think out loud about some possible ways to make it possible *without* being too expensive:<br><br>&nbsp; 1) Would having it as described work only while in Virtual mode be any help? This way there is a limited number of cells that have to be redrawn with markup (unless of course the BeforeDrawRow event limits itself to visible cells anyway, in which case there would be no benefit).<br><br>&nbsp; 2) What about going about it from the other end - Use Item.Caption for markup as you suggested, but then have an option for the in-place edit window to display the Item.Value property instead of the Item.Caption so that the plain-text is always what appears when the user is editing cells? The PreviewItem would also require a Value property in this case (which is currently omitted). Since the markup is already handled in this case and the edit window text is the only problem, this might be the best and easiest to implement option.<br><br><br>]]>
   </description>
   <pubDate>Mon, 13 Jul 2009 17:58:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50926&amp;title=metrics-markup-beforedrawrow#50926</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow : We already had this feature between...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50925&amp;title=metrics-markup-beforedrawrow#50925</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 13 July 2009 at 5:19pm<br /><br /><P>We already had this feature between 13.0 and official 13.1 where Oleg (who supports Markup) decided that this is proper way from efficiency point of view - use a parser for each subitem is too expenisive. He is right</P>]]>
   </description>
   <pubDate>Mon, 13 Jul 2009 17:19:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50925&amp;title=metrics-markup-beforedrawrow#50925</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow : The problems with using Item.Caption...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50924&amp;title=metrics-markup-beforedrawrow#50924</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 13 July 2009 at 5:16pm<br /><br />The problems with using Item.Caption are:<br><br>1) The markup is not dynamic at display time only, so the underlying caption gets changed. This means when the user edits the cell it displays the Markup text in full, instead of just plain text (maybe there should be an option to use the Value property for edit cell instead of the Caption?).<br>2) There is no Value property for the PreviewItem, so any attempts to append markup to the preview item caption in BeforeDrawRow continually adds to the existing Markup.<br><br>Changing the Metrics.Text to Item.Caption in the BeforeDrawRow event in my sample will illustrate these issues.<br><br>I guess it's not possible now, but it would be a great feature if we could have dynamic draw-time only markup of item values of plain text. So the user never needs to see markup when editing cells, and we can algorithmically format their plain-text with markup after they have finished editing cells. This would also ensure that markup doesn't affect sorting and grouping since sorting and grouping would always be based on the plain-text entered values.<br><br>For example:<br><br>1) User types Green into cell and finishes editing.<br>2) BeforeDrawRow event fires, Item.Value property contains string "Green"<br>3) We set Metrics.Text (or some other dynamic only property, Metrics.Text just seems to be the obvious choice since it should be modifying the underlying caption/value) to "&lt;TextBlock Foreground='" &amp; Item.Value &amp; "'&gt;&lt;Bold&gt;" &amp; Item.Value &amp; "&lt;/Bold&gt;&lt;/TextBlock&gt;" and the report cell now displays <font color="#009900"><b>Green</b><font color="#000000">.<br>4) User edits the cell again and only the plain-text Green appears in the in-place edit window. They change the edit text to Blue, and finish editing. Now the report cell displays <font color="#000099"><b>Blue</b><font color="#000000">.<br><br>Obviously this is just a simplified example without value validation/escaping, but it illustrates the basic goal that I am trying to achieve.<br></font></font></font></font>]]>
   </description>
   <pubDate>Mon, 13 Jul 2009 17:16:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50924&amp;title=metrics-markup-beforedrawrow#50924</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow : Try to use Item.Caption instead...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50923&amp;title=metrics-markup-beforedrawrow#50923</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 13 July 2009 at 4:54pm<br /><br /><P>Try to use Item.Caption instead of Metrics.Text</P><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 13 Jul 2009 16:54:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50923&amp;title=metrics-markup-beforedrawrow#50923</guid>
  </item> 
  <item>
   <title><![CDATA[Metrics Markup &amp; BeforeDrawRow : Here&amp;#039;s what I would like...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50887&amp;title=metrics-markup-beforedrawrow#50887</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14727<br /><strong>Posted:</strong> 12 July 2009 at 12:46pm<br /><br />Here's what I would like to be able to do:<br><br>1) Have the user type plain text into the ReportControl cells to modify data (no problem), including the Preview area (again, no problem).<br>2) After user has finished editing, I want to dynamically add markup to the plaintext for display using the BeforeDrawRow event and Metrics object (problem - Markup doesn't display using Metrics.Text).<br>3) When the user attempts to edit a cell that has had dynamic markup applied, the Inplace Edit window should show the original plain text as entered (not the dynamic markup!) and then the dynamic markup should be reapplied for display purposes only in the BeforeDrawRow event when plain text editing is complete (problem - the Metrics.Text property seems to affect the underlying ReportRecordItem.Value/Caption property).<br><br>The problem is that changing the Metrics.Text property doesn't seem to show markup (even though there has been some discussion about this working in the past, and possibly having been fixed for 13.1 - see: <a href="https://forum.codejock.com/forum_posts.asp?TID=13599" target="_blank">https://forum.codejock.com/forum_posts.asp?TID=13599</a> ), and more disconcertingly, changing the Metrics.Text property seems to affect the underlying Item.Caption and Item.Value properties even though the documentation states that changing Metrics item properties does not affect the original values of the ReportRecordItem.<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> <br><b>ReportRecordItemMetrics Object</b><!--DX end --><br>This is used for dynamic metrics only.&nbsp; This object is used to group together and store the general drawing metrics of a ReportRecordItem, such as the forecolor, backcolor, font, and text of each ReportRecordItem.&nbsp; Dynamic metrics means that value set for the forecolor, backcolor, font, and text of each ReportRecordItem <b>does not effect the original values of the ReportRecordItem</b>.<br></td></tr></table><br><br>Has anybody got this to work, or is it not possible?<br><br>Here's my attempt so far if anyone has any comments on where I am going wrong:<br><br><a href="uploads/20090712_124246_RcDynamicMarkup.zip" target="_blank">uploads/20090712_124246_RcDynamicMarkup.zip</a><br><br>Thanks in advance for any help.<br>]]>
   </description>
   <pubDate>Sun, 12 Jul 2009 12:46:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14727&amp;PID=50887&amp;title=metrics-markup-beforedrawrow#50887</guid>
  </item> 
 </channel>
</rss>