<?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 : [DISCUSSION] BeforeDrawRow event</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [DISCUSSION] BeforeDrawRow event]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:43:34 +0000</pubDate>
  <lastBuildDate>Mon, 22 Mar 2010 15:59:22 +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=15387</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[[DISCUSSION] BeforeDrawRow event : Comments from Codejock on the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=57724&amp;title=discussion-beforedrawrow-event#57724</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 22 March 2010 at 3:59pm<br /><br />Comments from Codejock on the BeforeDrawRowEx idea would be very appreciated!]]>
   </description>
   <pubDate>Mon, 22 Mar 2010 15:59:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=57724&amp;title=discussion-beforedrawrow-event#57724</guid>
  </item> 
  <item>
   <title><![CDATA[[DISCUSSION] BeforeDrawRow event :  I&amp;#039;ve had a chance to try...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=56486&amp;title=discussion-beforedrawrow-event#56486</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 30 January 2010 at 2:45pm<br /><br />I've had a chance to try a couple of tests so far with 14.0.0 beta. Some notes:<br><br><ol><li>BeforeDrawRow only fires on MouseMove for the cell that the mouse has entered. For hot-tracking purposes, maybe it should fire for the cell that the mouse has left as well?</li><li>Even though BeforeDrawRow fires on MouseMove, changes made to Item.Caption or Metrics.Text do not get updated on screen.</li><li>On MouseDown/MouseUp, BeforeDrawRow fires multiple times (2-3 times??)&nbsp; for <b>every visible cell on the report</b>. I can't imagine why this should happen, but there may be a good reason? I think it would be better to fire once for each recorditem in the previously selected rows that aren't currently selected, and then fire once for every recorditem in the newly selected rows that used to be unselected. This would cover all of the scenarios that I have imagined so far, but further exploration is needed here.</li><li>Even though the BeforeDrawRow fires on MouseDown/Up, changing the Item.Caption doesn't seem to get displayed immediately (the screen update is always one step behind).<br></li></ol><br>The fact that updates to the RC after changing the Item.Caption in BeforeDrawRow always seems to be behind makes me think that I am missing something (Redraw method doesn't work since it cause BeforeDrawRow to fire continuously, UpdateRecord killed the IDE for me - so what is the right way to get an immediate ReportItem update on-screen after changing the Item.Caption in the BeforeDrawRow event?).<br><br>Maybe what we need is a BeforeDrawRowFlags property with flags to control when BeforeDrawRow is fired based on our needs? Something like:<br><br><b>xtpBeforeDrawRowMouseEnter </b>- Fire when mouse enters a RecordItem. Only fire once for that recorditem.<br><b>xtpBeforeDrawRowMouseLeave</b> - Fire when mouse leaves a RecordItem. Only fire once fo that recorditem.<br><b>xtpBeforeDrawRowMouseMove</b> - Fire when mouse is moved within a RecordItem. Only fire for that recorditem.<br><b>xtpBeforeDrawRowMouseDown</b> - Fire when mouse button is depressed while over a RecordItem. only fire once for that recorditem<br><b>xtpBeforeDrawRowMouseUp</b> - Fire when mouse is released while over a RecordItem. Only fire once for that recorditem.<br><b>xtpBeforeDrawRowSelected</b> - Fire when a RecordItem parent Record becomes selected. Only fire once for that recorditem.<br><b>xtpBeforeDrawRowDeselected</b> - Fire when a RecordItem parent Record becomes deselected. Only fire once for that recorditem.<br><br>Flags could of course be combined to fire under multiple circumstances. It would be nice if the BeforeDrawRow event would also pass the flag that caused the firing as a parameter (of course, for Binary compatibility, this would mean we would need a different event, perhaps BeforeDrawRowEx).<br><br>These flags would cover all of the cases I have thought of so far where you would want BeforeDrawRow to fire, but there may be other times - any ideas on extensions for this list?<br><br>Here's the test project I was using:<br><br><a href="uploads/20100130_145004_RcBeforeDrawRow.zip" target="_blank">uploads/20100130_145004_RcBeforeDrawRow.zip</a><br>]]>
   </description>
   <pubDate>Sat, 30 Jan 2010 14:45:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=56486&amp;title=discussion-beforedrawrow-event#56486</guid>
  </item> 
  <item>
   <title><![CDATA[[DISCUSSION] BeforeDrawRow event : Hi,  It seems that I&amp;#039;m...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=56442&amp;title=discussion-beforedrawrow-event#56442</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 29 January 2010 at 2:57am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>It seems that I'm the only in here who has an opinion (except for Baldur of course) so I will leave it as is and will create my own "Update event" at least for Markup. </DIV><DIV>&nbsp;</DIV><DIV>Thank you</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 29 Jan 2010 02:57:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=56442&amp;title=discussion-beforedrawrow-event#56442</guid>
  </item> 
  <item>
   <title><![CDATA[[DISCUSSION] BeforeDrawRow event : Hi Aaron,   i have tested this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=54617&amp;title=discussion-beforedrawrow-event#54617</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2531">Baldur</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 06 November 2009 at 11:25am<br /><br />Hi Aaron, <DIV>&nbsp;</DIV><DIV>i have tested this "counter" long time ago, maybe with Version 9 and found also that the event somtimes is send oftener as needed.</DIV><DIV>But the main problem in this case is windows and "InvalidateRect" to reduce this events.</DIV><DIV>&nbsp;</DIV><DIV>I think, that the Report don't store the Metrics-Property in the Cells-Properties so in case of repaint, he must ask for.</DIV><DIV>On the other hand, you can decide by yourself with SetCustomDraw at runtime when events should occur or not.</DIV><DIV>&nbsp;</DIV><DIV>So you can decide in case of FocusChanging to turn the xtpCustomBeforeDrawRow on or off to reduce the events.</DIV><DIV>But in case of scrolling, sorting, grouping, the events are gone (no FocusChanging).</DIV><DIV>&nbsp;</DIV><DIV>On the other hand, most properties of metrics can be set for each individual items so perhaps you don't need this event.</DIV><DIV>&nbsp;</DIV><DIV>What i found is, that this event is fired for each column in the grid.</DIV><DIV>It can be automaticly reduced to only the visible columns !</DIV><DIV>&nbsp;</DIV><DIV>Regards</DIV><DIV>Baldur</DIV>]]>
   </description>
   <pubDate>Fri, 06 Nov 2009 11:25:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=54617&amp;title=discussion-beforedrawrow-event#54617</guid>
  </item> 
  <item>
   <title><![CDATA[[DISCUSSION] BeforeDrawRow event :   Baldur wrote:Hello,   every...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=54607&amp;title=discussion-beforedrawrow-event#54607</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 06 November 2009 at 12:55am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Baldur" alt="Originally posted by Baldur" style="vertical-align: text-bottom;" /> <strong>Baldur wrote:</strong><br /><br />Hello, <DIV>&nbsp;</DIV><DIV>every event change the focus and so the layout of cells.</DIV><DIV>Please don't change this behavior.</DIV></td></tr></table> <DIV>&nbsp;</DIV><DIV>Hi Baldur,</DIV><DIV>&nbsp;</DIV><DIV>I'm glad someone joined the discussion <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0">&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>My question to you: why should fire BeforeDrawRow event on a mouseclick (or any of the other cases in my list) The RC looks exactly the same as before I clicked in RC area.&nbsp;So in these cases I don't want that event to fore. Just for fun,&nbsp;add some counter in&nbsp;BeforeDrawRow event in Jason Demo with Markup widgets and see how many times the&nbsp;BeforeDrawRow&nbsp;fires. It's consumes a lot of (sometimes) processor time and in some cases "forgets" the (like in Jason's Demo)&nbsp;mouseclick. </DIV><DIV>&nbsp;</DIV><DIV>Just give me a <strong>reason</strong> why the event should still fire not just: "<strong><FONT color=#666666>every event change the focus and so the layout of cells.</FONT></strong></DIV><DIV><strong><FONT color=#666666>Please don't change this behavior</FONT></strong>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Thank you for reply and I hope many others will join in this discussion <img src="https://forum.codejock.com/smileys/smiley4.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 06 Nov 2009 00:55:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=54607&amp;title=discussion-beforedrawrow-event#54607</guid>
  </item> 
  <item>
   <title><![CDATA[[DISCUSSION] BeforeDrawRow event : Hello,  every event change the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=54584&amp;title=discussion-beforedrawrow-event#54584</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2531">Baldur</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 05 November 2009 at 10:01am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>every event change the focus and so the layout of cells.</DIV><DIV>Please don't change this behavior.</DIV>]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 10:01:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=54584&amp;title=discussion-beforedrawrow-event#54584</guid>
  </item> 
  <item>
   <title><![CDATA[[DISCUSSION] BeforeDrawRow event : Hi    This post is about when...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=53957&amp;title=discussion-beforedrawrow-event#53957</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 15387<br /><strong>Posted:</strong> 17 October 2009 at 6:57am<br /><br />Hi <DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>This post is about when to fire BeforeDrawRow event and when not. In my opinion (and maybe others as well) the BeforeDrawRow event is overdoing it's job. There are cases when no event is required because nothing has to be redrawn (in my opinion) but maybe there are members who need the event anyway. Here's a list of cases in which I don't think the event has to be fired.</DIV><DIV>&nbsp;</DIV><DIV>Note:&nbsp; <strong>Mark asked me to produce&nbsp;this list</strong> <strong>because of some problems we encountered in Jason's Markup Demo</strong> (<a href="https://forum.codejock.com/forum_posts.asp?TID=14983" target="_blank">https://forum.codejock.com/forum_posts.asp?TID=14983</A>) </DIV><OL><LI><FONT color=#000000>MouseDown</FONT> <LI><FONT color=#000000>MouseUp</FONT> <LI><FONT color=#000000 size=2>Select&nbsp;previous row with arrow up (only fire event when selecting previous row at the top of course)</FONT> <LI><FONT color=#000000 size=2>Select&nbsp;next row with arrow down (only fire event when selecting next row at the bottom of course)</FONT> <LI><FONT color=#000000 size=2>Select&nbsp;row with arrow&nbsp;left (only fire event when selecting previous row at the top of course)</FONT> <LI><FONT color=#000000 size=2>Select&nbsp;row with arrow right (only fire event when selecting next row at the bottom of course)</FONT>&nbsp; <LI><FONT color=#000000>TAB key</FONT> <LI>CTRL + SPACE <LI>CTRL + A (only <FONT size=2>fire event </FONT>if last row isn't visible yet) note: CTRL + A seems to scroll to last row)</LI></OL><DIV>Please, if you can think of other cases, don't hesitate to reply. </DIV><DIV>&nbsp;</DIV><DIV>Thanks a lot</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 17 Oct 2009 06:57:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15387&amp;PID=53957&amp;title=discussion-beforedrawrow-event#53957</guid>
  </item> 
 </channel>
</rss>