<?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 : GetFocusedColumn returns NULL?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : GetFocusedColumn returns NULL?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 14:56:58 +0000</pubDate>
  <lastBuildDate>Thu, 23 Apr 2009 04:04:36 +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=13918</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[GetFocusedColumn returns NULL? : I doubt the default code will...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=48274&amp;title=getfocusedcolumn-returns-null#48274</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13918<br /><strong>Posted:</strong> 23 April 2009 at 4:04am<br /><br />I doubt the default code will work when FocusSubItems(FALSE) is set. I only have one editable column!]]>
   </description>
   <pubDate>Thu, 23 Apr 2009 04:04:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=48274&amp;title=getfocusedcolumn-returns-null#48274</guid>
  </item> 
  <item>
   <title><![CDATA[GetFocusedColumn returns NULL? : You already saw recent code so...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=48208&amp;title=getfocusedcolumn-returns-null#48208</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13918<br /><strong>Posted:</strong> 21 April 2009 at 4:08pm<br /><br /><P>You already saw recent code so question is historical. For specific settings base class support for keypress F2 will open in-pace&nbsp;editor to start.</P>]]>
   </description>
   <pubDate>Tue, 21 Apr 2009 16:08:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=48208&amp;title=getfocusedcolumn-returns-null#48208</guid>
  </item> 
  <item>
   <title><![CDATA[GetFocusedColumn returns NULL? : If I start editing an item when...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=48144&amp;title=getfocusedcolumn-returns-null#48144</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13918<br /><strong>Posted:</strong> 20 April 2009 at 7:45am<br /><br />If I start editing an item when handling VK_F2 in CMyReportControl::OnKeyDown AND let the base-class handle this message, the editing is immediately cancelled:<DIV>&nbsp;</DIV><DIV>CXTPReportControl::OnKeyDown(...); // Editing will be cancelled!</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>This was the main issue here. Not sure if it's a bug or by design.</DIV>]]>
   </description>
   <pubDate>Mon, 20 Apr 2009 07:45:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=48144&amp;title=getfocusedcolumn-returns-null#48144</guid>
  </item> 
  <item>
   <title><![CDATA[GetFocusedColumn returns NULL? : in current version   void CX...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=47696&amp;title=getfocusedcolumn-returns-null#47696</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 13918<br /><strong>Posted:</strong> 08 April 2009 at 4:31pm<br /><br />in current version <FONT color=#0000ff size=2><DIV><FONT color=#0000ff size=2><P>void</FONT><FONT size=2><FONT color=#000000> CXTPReportControl::OnKeyDown</P><DIV></FONT></FONT>....................</DIV><DIV>case</FONT><FONT size=2> VK_F2:</DIV></DIV><P>GetNavigator()-&gt;BeginEdit();</P><P></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</P><DIV></DIV><DIV>...................</DIV><DIV>}</DIV><DIV><FONT color=#0000ff size=2><P>void</FONT><FONT size=2> CXTPReportNavigator::BeginEdit()</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!m_pReportControl)</P><P></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2>;</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!m_pReportControl-&gt;IsIconView())</P><P>{</P><P>m_pReportControl-&gt;AdjustScrollBars();</P><P>m_pReportControl-&gt;RedrawControl();</P><P>m_pReportControl-&gt;UpdateWindow();</P><P>CXTPReportRow* pFocusedRow = m_pReportControl-&gt;GetFocusedRow();</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (m_pReportControl-&gt;m_pFocusedColumn &amp;&amp;</P><P>pFocusedRow &amp;&amp; pFocusedRow-&gt;GetRecord())</P><P>{</P><P>XTP_REPORTRECORDITEM_ARGS itemArgs(m_pReportControl, pFocusedRow, m_pReportControl-&gt;m_pFocusedColumn);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (itemArgs.pItem &amp;&amp; itemArgs.pItem-&gt;IsAllowEdit(&amp;itemArgs))</P><P>{</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!m_pReportControl-&gt;IsVirtualMode())</P><P>m_pReportControl-&gt;EnsureVisible(pFocusedRow);</P><P>m_pReportControl-&gt;EditItem(&amp;itemArgs);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (m_pReportControl-&gt;GetInplaceEdit()-&gt;GetSafeHwnd() &amp;&amp;</P><P>m_pReportControl-&gt;GetInplaceEdit()-&gt;GetItem() == itemArgs.pItem)</P><P>{</P><P>CXTPReportRecordItemEditOptions* pEditOptions = itemArgs.pItem-&gt;GetEditOptions(itemArgs.pColumn);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (pEditOptions &amp;&amp; pEditOptions-&gt;m_bSelectTextOnEdit)</P><P>{</P><P>m_pReportControl-&gt;GetInplaceEdit()-&gt;SetSel(0, -1);</P><P>}</P><P></FONT><FONT color=#0000ff size=2>else</P></FONT><FONT size=2><P>{</P><P>CString str;</P><P>m_pReportControl-&gt;GetInplaceEdit()-&gt;GetWindowText(str);</P><P>m_pReportControl-&gt;GetInplaceEdit()-&gt;SetSel(str.GetLength(), str.GetLength());</P><P>}</P><P>}</P><P>}</P><P>}</P><P>}</P><P></FONT><FONT color=#0000ff size=2>else</P></FONT><FONT size=2><P>{</P><P>CXTPReportRow* pFocusedRow = m_pReportControl-&gt;GetFocusedRow();</P><P>CXTPReportColumn* pIconCOlumn = m_pReportControl-&gt;GetColumns()-&gt;Find(m_pReportControl-&gt;m_iIconViewColumn);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (pIconCOlumn &amp;&amp;</P><P>pFocusedRow &amp;&amp; pFocusedRow-&gt;GetRecord())</P><P>{</P><P>XTP_REPORTRECORDITEM_ARGS itemArgs(m_pReportControl, pFocusedRow, pIconCOlumn);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (itemArgs.pItem &amp;&amp; itemArgs.pItem-&gt;IsAllowEdit(&amp;itemArgs))</P><P>{</P><P>m_pReportControl-&gt;EditItem(&amp;itemArgs);</P><P>}</P><P>}</P><P>}</P><P>}</P></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 08 Apr 2009 16:31:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=47696&amp;title=getfocusedcolumn-returns-null#47696</guid>
  </item> 
  <item>
   <title><![CDATA[GetFocusedColumn returns NULL? : In my report-control I have this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=47567&amp;title=getfocusedcolumn-returns-null#47567</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 13918<br /><strong>Posted:</strong> 04 April 2009 at 6:10am<br /><br /><DIV>In my report-control I have this in OnKeyDown:</DIV><DIV>&nbsp;</DIV><DIV>case VK_F2:<BR>{<BR>&nbsp;&nbsp;&nbsp; CXTPReportSelectedRows *pSelectedRows = GetSelectedRows();<BR>&nbsp;&nbsp;&nbsp; if (pSelectedRows &amp;&amp; pSelectedRows-&gt;GetCount())<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XTP_REPORTRECORDITEM_ARGS itemArgs(this, pSelectedRows-&gt;GetAt(0), <strong>GetFocusedColumn()</strong>);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EditItem(&amp;itemArgs);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (GetInplaceEdit()-&gt;GetSafeHwnd())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int len = GetInplaceEdit()-&gt;GetWindowTextLength();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GetInplaceEdit()-&gt;SetSel(len, len);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>}</DIV><DIV>&nbsp;</DIV><DIV>This worked before, but nowadays GetFocusedColumn() always returns NULL, resulting in an assert/crash. What did you change? (Using XTP 13.0.0)</DIV>]]>
   </description>
   <pubDate>Sat, 04 Apr 2009 06:10:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13918&amp;PID=47567&amp;title=getfocusedcolumn-returns-null#47567</guid>
  </item> 
 </channel>
</rss>