<?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 : [HOWTO] Edit in header rows in virtual mode</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [HOWTO] Edit in header rows in virtual mode]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 04 Jun 2026 01:01:27 +0000</pubDate>
  <lastBuildDate>Mon, 13 Nov 2017 07:39:31 +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=23479</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[[HOWTO] Edit in header rows in virtual mode : Strange, but after a full recompile...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76275&amp;title=howto-edit-in-header-rows-in-virtual-mode#76275</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 13 November 2017 at 7:39am<br /><br />Strange, but after a full recompile of the Toolkit it works.<br><br>TIA<br>]]>
   </description>
   <pubDate>Mon, 13 Nov 2017 07:39:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76275&amp;title=howto-edit-in-header-rows-in-virtual-mode#76275</guid>
  </item> 
  <item>
   <title><![CDATA[[HOWTO] Edit in header rows in virtual mode : Hi,  mgampi wrote:When will this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76272&amp;title=howto-edit-in-header-rows-in-virtual-mode#76272</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 10 November 2017 at 8:49am<br /><br />Hi,<br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by mgampi" alt="Originally posted by mgampi" style="vertical-align: text-bottom;" /> <strong>mgampi wrote:</strong><br /><br />When will this be officially released?</td></tr></table><br>We are testing next release now but without recent changes.<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by mgampi" alt="Originally posted by mgampi" style="vertical-align: text-bottom;" /> <strong>mgampi wrote:</strong><br /><br /><span style=": rgb248, 248, 252;">but when I click into the header item a second time, the text disappears.</span></td></tr></table>&nbsp;<br>On updating ReportControl the text are taken from DB, so I can suppose that you just don't save changes in DB. See methods&nbsp;<span style=": rgb248, 248, 252;">CVirtualRecord::UpdateRecordField and&nbsp;</span>CVirtualRecord::GetItemMetrics&nbsp; in&nbsp;sample VirtualList\VirtualListView.cpp&nbsp; &nbsp;My changes in Header section available also after restarting sample.<br><br>Regards,<br>&nbsp;Oleksandr Lebed]]>
   </description>
   <pubDate>Fri, 10 Nov 2017 08:49:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76272&amp;title=howto-edit-in-header-rows-in-virtual-mode#76272</guid>
  </item> 
  <item>
   <title><![CDATA[[HOWTO] Edit in header rows in virtual mode : Hi;Now I have another problem:I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76271&amp;title=howto-edit-in-header-rows-in-virtual-mode#76271</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 10 November 2017 at 6:17am<br /><br />Hi;<br><br>Now I have another problem:<br>I have no records in the body section.<br>I'm editing an item in the (only single) header row. That's ok, but when I click into the header item a second time, the text disappears. Moving the focus out of the item without typing, I see the initially entered text again.<br>If the control has records in the body section, the item and edit control behave as expected.<br>Strange!<br>You can reproduce it with the above mentioned sample.<br>]]>
   </description>
   <pubDate>Fri, 10 Nov 2017 06:17:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76271&amp;title=howto-edit-in-header-rows-in-virtual-mode#76271</guid>
  </item> 
  <item>
   <title><![CDATA[[HOWTO] Edit in header rows in virtual mode : It works , thanks...When will...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76269&amp;title=howto-edit-in-header-rows-in-virtual-mode#76269</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 10 November 2017 at 3:22am<br /><br />It works <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" alt="Clap" title="Clap" />, thanks...<br><br>When will this be officially released?<br>]]>
   </description>
   <pubDate>Fri, 10 Nov 2017 03:22:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76269&amp;title=howto-edit-in-header-rows-in-virtual-mode#76269</guid>
  </item> 
  <item>
   <title><![CDATA[[HOWTO] Edit in header rows in virtual mode : Hi;I&amp;#039;ll try it and come back...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76263&amp;title=howto-edit-in-header-rows-in-virtual-mode#76263</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 08 November 2017 at 3:34am<br /><br />Hi;<br><br>I'll try it and come back soon.<br>]]>
   </description>
   <pubDate>Wed, 08 Nov 2017 03:34:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76263&amp;title=howto-edit-in-header-rows-in-virtual-mode#76263</guid>
  </item> 
  <item>
   <title><![CDATA[[HOWTO] Edit in header rows in virtual mode : Hello Martin,I have found what...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76261&amp;title=howto-edit-in-header-rows-in-virtual-mode#76261</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 07 November 2017 at 2:45pm<br /><br />Hello Martin,<div><br></div><div>I have found what is the reason. Problem was in method CXTPReportControl::EditItem().</div><div>It resets pItemArgs-&gt;pRow but gets row always from body section. So fixed code is below:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode">void CXTPReportControl::EditItem(XTP_REPORTRECORDITEM_ARGS *pItemArgs)</div><div>{</div><div>&nbsp; &nbsp; CXTPReportRecordItem *pItem = pItemArgs ? pItemArgs-&gt;pItem : NULL;</div><div><br></div><div>&nbsp; &nbsp; if (NULL == m_pActiveItem &amp;&amp; NULL == pItem)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; // Nothing do to</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return;</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; if (m_pActiveItem != NULL)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; m_pActiveItem-&gt;OnCancelEdit(this, TRUE);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; m_pActiveItem = NULL;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (!m_bFocusSubItems)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetFocusedColumn(NULL);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; CMDTARGET_RELEASE(m_ptrVirtualEditingRow);</div><div><br></div><div>&nbsp; &nbsp; if (pItem &amp;&amp; pItemArgs &amp;&amp; pItemArgs-&gt;pRow)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (!HasFocus())</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetFocus();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (!IsVirtualMode())</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AdjustScrollBars();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RedrawControl();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UpdateWindow();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (IsVirtualMode())</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int nRowIndex = pItemArgs-&gt;pRow-&gt;GetIndex();</div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXTPReportSection* pSection = pItemArgs-&gt;pRow-&gt;GetSection();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASSERT(pSection != NULL);</font></b></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //EnsureVisible(pItemArgs-&gt;pRow);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RedrawControl();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UpdateWindow();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pItemArgs-&gt;pRow = NULL; // RedrawControl delete and re-create new screen rows</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BOOL bMapped = FALSE;</div><div><b><font color="#00cc00"><br></font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pSection)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</font></b></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXTPReportScreenRows *pScreenRows = <b><font color="#00cc00">pSection-&gt;</font></b>GetRows()-&gt;GetScreenRows();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt;pScreenRows-&gt;GetSize(); i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXTPReportRow* pRow = pScreenRows-&gt;GetAt(i);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pRow-&gt;GetIndex() == nRowIndex)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pItemArgs-&gt;pRow = pRow;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bMapped = TRUE;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASSERT(m_ptrVirtualEditingRow == NULL);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_ptrVirtualEditingRow = pRow;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CMDTARGET_ADDREF(m_ptrVirtualEditingRow);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b><font color="#00cc00"> }</font></b></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASSERT(bMapped);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!bMapped)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; else if (GetFocusedRow() != pItemArgs-&gt;pRow)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BOOL bControlKey = (::GetKeyState(VK_CONTROL) &lt; 0) || m_bMultiSelectionMode;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetFocusedRow(pItemArgs-&gt;pRow, bControlKey);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UpdateWindow();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; ....</pre></td></tr></table><br>Also you should use separated CVirtualRecord&nbsp; for header or footer sections&nbsp; because callback method for updating&nbsp; CVirtualRecord::UpdateRecordField()&nbsp; don't recognize sections. It used only row and column positions to identify records. Also for separates data sets. However maybe this will useful for you as is.<br><br></div><div>Regards,</div><div>&nbsp;Oleksandr Lebed</div>]]>
   </description>
   <pubDate>Tue, 07 Nov 2017 14:45:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76261&amp;title=howto-edit-in-header-rows-in-virtual-mode#76261</guid>
  </item> 
  <item>
   <title><![CDATA[[HOWTO] Edit in header rows in virtual mode : Hi;I try to edit header row items...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76258&amp;title=howto-edit-in-header-rows-in-virtual-mode#76258</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 23479<br /><strong>Posted:</strong> 07 November 2017 at 4:23am<br /><br />Hi;<br><br>I try to edit header row items when I use a virtual report control in Toolkit 18.0.1.<br>As a starting point I use the CJ "Virtual List Sample". <br><br>I modified the code by adding those lines to the CVirtualListView::OnCreate function:<br><br><table width="99%"><tr><td><pre class="BBcode">wndReport.GetHeaderRecords()-&gt;Add(new CVirtualRecord(pSet));<br>wndReport.ShowHeaderRows(TRUE);<br>wndReport.HeaderRowsAllowAccess(TRUE);<br>wndReport.HeaderRowsEnableSelection(TRUE);<br>wndReport.HeaderRowsAllowEdit(TRUE);</pre></td></tr></table><br><br>In body section the edit control appears, but not in the header section.<br><br>What's wrong?<br><br>TIA<br><br><br>]]>
   </description>
   <pubDate>Tue, 07 Nov 2017 04:23:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23479&amp;PID=76258&amp;title=howto-edit-in-header-rows-in-virtual-mode#76258</guid>
  </item> 
 </channel>
</rss>