<?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 : [SOLVED] Where am I wrong now? (selectionbycolumn)</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [SOLVED] Where am I wrong now? (selectionbycolumn)]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 23:36:50 +0000</pubDate>
  <lastBuildDate>Wed, 06 Oct 2010 08:47:10 +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=17374</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[[SOLVED] Where am I wrong now? (selectionbycolumn) :   Aaron wrote:Hi,   If you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60734&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60734</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 06 October 2010 at 8:47am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br />Hi, <DIV>&nbsp;</DIV><DIV>If you check my test project, you don't need MouseDown event to get this working. I used that so you can see that it is working.</DIV><DIV>&nbsp;</DIV></td></tr></table> <DIV>Yes, you are right (to duplicate code is for noobs <img src="http://forum.codejock.com/smileys/smiley9.gif" height="17" width="17" border="0" alt="Embarrassed" title="Embarrassed" />).</DIV><DIV>I noticed now you posted it 1 minute before me. I removed the mousedown event and its working anyway.</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br />Hi, </DIV><DIV>&nbsp;</DIV><DIV>I also see that you&nbsp;didn't set .Sortable = False for the columns? If you don't set it to false, your users are able to sort by clicking on column.</DIV></td></tr></table> <DIV>Its&nbsp;set &nbsp;.AllowColumnSort = False at ReportControl level to lock. It works fine.</DIV>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 08:47:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60734&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60734</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Hi,  If you check my test project,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60733&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60733</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 06 October 2010 at 8:24am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>If you check my test project, you don't need MouseDown event to get this working. I used that so you can see that it is working. (FocusChange event didn't return NewColumn and NewItem because (I think...) 2 versions were installed and I didn't uninstall previous version) But you can use FocusChange event for this and remove MouseDown event. </DIV><DIV>&nbsp;</DIV><DIV>I also see that you&nbsp;didn't set .Sortable = False for the columns? If you don't set it to false, your users are able to sort by clicking on column.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 08:24:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60733&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60733</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Solved!   Thanks Aaron. This...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60732&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60732</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 06 October 2010 at 8:03am<br /><br />Solved! <img src="http://forum.codejock.com/smileys/smiley20.gif" height="17" width="23" border="0" alt="Thumbs Up" title="Thumbs Up" /><DIV>&nbsp;</DIV><DIV>Thanks Aaron. This is the result:</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/2720/columnselecti&#111;n1.jpg" height="333" width="828" border="0" /></DIV><DIV>&nbsp;</DIV><DIV>A "whole new world" with&nbsp;vista look&nbsp;<img src="http://forum.codejock.com/smileys/smiley14.gif" height="17" width="17" border="0" alt="Approve" title="Approve" /></DIV><DIV>&nbsp;</DIV><DIV>This is the code I used for (if some1 needs it):</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><BR>Private Sub Form_Load()<BR>&nbsp;&nbsp;&nbsp; With ReportControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .BorderStyle = xtpBorderThemedFrame<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Move 120, 120</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowColumnRemove = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowColumnReorder = False<BR>'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowColumnResize = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowColumnSort = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AllowEdit = False</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EnableMarkup = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EditOnClick = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FastDeselectMode = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FocusSubItems = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FullColumnScrolling = True</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .HeaderRowsAllowEdit = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .InitialSelectionEnable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .MultipleSelection = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .RightToLeft = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SelectionEnable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ShowHeader = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ShowHeaderRows = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ShowRowFocus = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SetCustomDraw xtpCustomDrawItem</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .PaintManager<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ShowNonActiveInPlaceButton = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ColumnStyle = xtpColumnShaded<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Excel 2007 colors<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .CaptionBackGradientColorLight = RGB(&amp;HF9, &amp;HFC, &amp;HFD)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .CaptionBackGradientColorDark = RGB(&amp;HD3, &amp;HDB, &amp;HE9)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .GridLineColor = RGB(&amp;HD0, &amp;HD7, &amp;HE5)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .VerticalGridStyle = xtpGridSolid<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ColumnHotGradientColorDark = .CaptionBackGradientColorDark<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ColumnHotGradientColorLight = .CaptionBackGradientColorLight<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ColumnPushedGradientColorDark = .ColumnHotGradientColorLight<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ColumnPushedGradientColorLight = .ColumnHotGradientColorDark<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .InvertColumnOnClick = False</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FreezeColsDividerStyle = xtpReportFreezeColsDividerHeader<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FixedRowHeight = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .HideSelection = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .GrayIfDisable = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ForceDynamicMarkupForCell = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' .CaptionFont = gFontName<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' .TextFont = gFontName<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Redraw</DIV><DIV>&nbsp;&nbsp;&nbsp; End With</DIV><DIV><BR>&nbsp;&nbsp;&nbsp; With ReportControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AutoColumnSizing = False&nbsp;&nbsp; ' to resolve bug<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SelectionEnable = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.ShadeSortColumn = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.ShadeSortColor = RGB(&amp;HBF, &amp;HDB, &amp;HFF)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.DrawSortTriangleAlways = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.DrawSortTriangleStyle = xtpReportDrawSortTriangleNever&nbsp;&nbsp;&nbsp; 'Doesn't draw sort icon in column<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .StrictBestFit = False</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Populate RecordControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' for col 0 and 1 set Item.BackColor = ReportControl.PaintManager.CaptionBackColor<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp;&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FreezeColumnsCount = 2</DIV><DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;' autosize columns<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = .FreezeColumnsCount To .Columns.Count - 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(i).BestFitMode = xtpBestFitModeAllData<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(i).Resizable = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(i).BestFit<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns(i).Resizable = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next</DIV><DIV>&nbsp;&nbsp;&nbsp; End With</DIV><DIV>End Sub</DIV><DIV><BR>Private Sub ReportControl_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ... , Cancel As Boolean)<BR>&nbsp;&nbsp;&nbsp; If Not NewColumn Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If NewColumn.Index &gt;= ReportControl.FreezeColumnsCount Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReportControl.SortOrder.DeleteAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReportControl.SortOrder.Add NewColumn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cancel = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If<BR>End Sub</DIV><DIV>Private Sub ReportControl_MouseDown(Button As Integer, Shift As Integer, X As Long, Y As Long)<BR>Dim NewColumn As ReportColumn<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If ReportControl.HitTest(X, Y).ht = xtpHitTestReportArea Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set NewColumn = ReportControl.HitTest(X, Y).Column<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If NewColumn.Index &gt;= ReportControl.FreezeColumnsCount Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReportControl.SortOrder.DeleteAll<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReportControl.SortOrder.Add NewColumn<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>End Sub</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>I&nbsp;cannot think I can Select a column using a "sort-like" property. But it works.</DIV><DIV>I&nbsp;need to use checks over FreezeColumnsCount. A new property FixedColumnsCount would be appreciated <img src="http://forum.codejock.com/smileys/smiley2.gif" height="17" width="17" border="0" alt="Wink" title="Wink" />.</DIV><DIV>&nbsp;</DIV><DIV>Again, thank you all.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 08:03:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60732&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60732</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Hi,  OK, I created test for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60731&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60731</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 06 October 2010 at 8:02am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>OK, I created test for you and keep this project to get answers for your other problems. </DIV><DIV>&nbsp;</DIV><DIV><a href="http://forum.codejock.com/uploads/3701/TestAlbert1.zip" target="_blank">uploads/3701/TestAlbert1.zip</A></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 08:02:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60731&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60731</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Hi,   Please one thing at a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60727&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60727</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 06 October 2010 at 5:14am<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>Please one thing at a time <img src="http://forum.codejock.com/smileys/smiley2.gif" height="17" width="17" border="0" alt="Wink" title="Wink" />&nbsp;If this has been solved we will move to next "problem", OK?</DIV><DIV>&nbsp;</DIV><DIV>Column selection problem:</DIV><DIV>&nbsp;</DIV><UL><LI>Add columns that aren't sortable (if you don't want users to sort it of course)</LI><LI>Add wndReportControl.PaintManager.DrawSortTriangleAlways = False</LI><LI>Add wndReportControl.PaintManager.DrawSortTriangleStyle = xtpReportDrawSortTriangleNever 'Doesn't draw sort icon in column)</LI></UL><P>Add <strong>MouseDown </strong>event (this because FocusChanging isn't returning NewColumn and NewItem object GRRRRRR............. I tried with V13.4.1 <img src="http://forum.codejock.com/smileys/smiley7.gif" height="17" width="17" border="0" alt="Angry" title="Angry" />)&nbsp;</P><DIV>Well to have a solution for you:</DIV><DIV>&nbsp;</DIV><DIV>Private Sub wndReportControl_MouseDown(Button As Integer, Shift As Integer, x As Long, y As Long)<BR>&nbsp;&nbsp;&nbsp; Me.wndReportControl.SortOrder.DeleteAll<BR>&nbsp;&nbsp;&nbsp; Me.wndReportControl.SortOrder.Add Me.wndReportControl.HitTest(x, y).Column<BR>End Sub</DIV><DIV>&nbsp;</DIV><DIV>Well, if this helps you a little, we go to the next level <img src="http://forum.codejock.com/smileys/smiley17.gif" height="17" width="17" border="0" alt="T&#111;ngue" title="T&#111;ngue" /></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 05:14:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60727&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60727</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Thank you Aaron for the suggestions,   ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60724&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60724</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 06 October 2010 at 4:25am<br /><br /><DIV>Thank you Aaron for the suggestions,</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br />&nbsp;</DIV><DIV><strong>Focused column color:</strong></DIV><DIV>&nbsp;</DIV><DIV>With wndReportControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.PaintManager.ShadeSortColumn =&nbsp;True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.ShadeSortColor = vbYellow</DIV><DIV>End With</DIV><DIV>&nbsp;</DIV></td></tr></table> <DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>I dont want the user can sort the columns. So I cannot use this approach. </DIV><DIV>I wish to substitute this "old" grid with a new themed grid:</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/2720/columnselecti&#111;n.jpg" height="321" width="686" border="0" /></DIV><DIV>&nbsp;</DIV><DIV>The user can browse through models details using the mouse&nbsp;and/or the keyboard. There is allways a selected column. If the user wants, he can click on OK&nbsp;and the model is selected for the main form.</DIV><DIV>I can reach this with really little code using vsflex:</DIV><DIV>&nbsp;</DIV><DIV>I set:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>vsFlex.SelectionMode = flexSelectionByColumn</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>and only 1 event</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>Private Sub vsFlex_RowColChange()<BR>&nbsp;&nbsp;&nbsp; m_SelectedCol = vs.Col<BR>End Sub</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Thats all I need!!!</DIV><DIV>&nbsp;</DIV><DIV>Further I can set:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>vsFlex.FixedCols = 2</DIV><DIV></pre></td></tr></table></DIV><DIV>this way the first two column are really "fixed" and you cannot reach them with keyboard (this is asked by many people in this forum ...)</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br /></DIV><DIV>Public Sub Redraw() </DIV><DIV>Remarks<BR>This method needs to be called any time you change a property in the ReportPaintManager....</DIV><DIV>&nbsp;</DIV><DIV>Public Sub Populate()</DIV><DIV>Remarks</DIV><DIV>ReportRows(which are associated with a ReportRecord) will not be added ...</DIV><DIV></td></tr></table> </DIV><DIV>&nbsp;</DIV><DIV>I know this methods but they are not enough (if I am not wrong). Please check this code:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>Option Explicit</DIV><DIV>Dim m_SelectedCol As Integer<BR>Private Sub Form_Load()<BR>Dim i As Integer, j As Integer<BR>&nbsp;&nbsp;&nbsp; Width = 7200<BR>&nbsp;&nbsp;&nbsp; Height = 4500<BR>&nbsp;&nbsp;&nbsp; With ReportControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AutoColumnSizing = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FocusSubItems = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .SetCustomDraw xtpCustomDrawItem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To 5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add i, "Col " &amp; Chr$(65 + i), 150, False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To 20<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For j = 0 To 5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem Chr$(65 + j)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next j<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<BR>&nbsp;&nbsp;&nbsp; End With<BR>End Sub<BR>Private Sub Form_Resize()<BR>&nbsp;&nbsp;&nbsp; ReportControl.Move 0, 0, ScaleWidth, ScaleHeight<BR>End Sub<BR>Private Sub ReportControl_DrawItem(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal hDC As stdole.OLE_HANDLE, ByVal left As Long, ByVal top As Long, ByVal right As Long, ByVal bottom As Long, DoDefault As Boolean)<BR>&nbsp;&nbsp;&nbsp; If Column.Index = m_SelectedCol Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.BackColor = vbYellow<BR>&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.BackColor = vbWhite<BR>&nbsp;&nbsp;&nbsp; End If<BR>End Sub<BR>Private Sub ReportControl_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)<BR>&nbsp;&nbsp;&nbsp; m_SelectedCol = NewColumn.Index<BR>End Sub<BR></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Run it. You can observe that:</DIV><DIV>1) The selected cell is "Col B", first row. Just curiosity. Why not "Col A"?</DIV><DIV>2) The event DrawItem is raised but nothing happens. Why?</DIV><DIV>3) Press the&nbsp;right arrow key. DrawItem set yellow in the first column? </DIV><DIV>From the help of DrawItem method: </DIV><DIV><EM>Column <BR>The ReportColumn that that contains the items that is currently being drawn.</EM></DIV><DIV>So my code&nbsp;is valid.</DIV><DIV>4) Press again the right arrow key. DrawItem event set yellow to Col C (btw the focus is on Col D)</DIV><DIV>5) Press left and/or right arrow key ... You will see.</DIV><DIV>&nbsp;</DIV><DIV>Remarks</DIV><DIV>If I had a Refresh method I could call when I want to do it, my problems were done? Or not?</DIV><DIV>&nbsp;</DIV><DIV>In your opinion, should I have to open a ticket? I have subscription too.</DIV><DIV>&nbsp;</DIV><DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br /></DIV></DIV><DIV>I know ReportControl is an advanced control when you start using it, I know, I have been there&nbsp; I believe it's a great control once you know how to use it (and problems are solved in near future...)</DIV><DIV></td></tr></table></DIV><DIV>Thank you Aaron. Btw I am not so noob ;). I can be noob with english language but not with VB language <img src="http://forum.codejock.com/smileys/smiley2.gif" height="17" width="17" border="0" alt="Wink" title="Wink" />. I dont fully agree with you about RC is a great control. I am using it for more than 2 years and I can do only simple works. I am not still able to fully substitute a TDBgrid and/or VSFlex. I hope&nbsp;for the next future (but it seems CJ wants to upgrade markup instead of RC <img src="http://forum.codejock.com/smileys/smiley19.gif" height="17" width="17" border="0" alt="Cry" title="Cry" />).</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 04:25:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60724&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60724</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Hi,   Focused column color:  With...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60705&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60705</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 05 October 2010 at 2:36pm<br /><br />Hi, <DIV>&nbsp;</DIV><DIV><strong>Focused column color:</strong></DIV><DIV>&nbsp;</DIV><DIV>With wndReportControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.PaintManager.ShadeSortColumn =&nbsp;True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .PaintManager.ShadeSortColor = vbYellow</DIV><DIV>End With</DIV><DIV>&nbsp;</DIV><DIV><img src="http://forum.codejock.com/uploads/3701/RC_Column_Sel.bmp" height="140" width="447" border="0" /></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><strong><FONT color=#ff0000>Question:</FONT></strong></DIV><DIV>&nbsp;</DIV><DIV><DIV>I reach the goal. But another bug is that I cannot use:</DIV><DIV><TABLE width="99%"><T><T><tr><TD><PRE ="BBcode"><DIV></DIV><DIV>ReportControl.SelectionEnable = False</DIV><DIV></DIV></PRE></td></tr></T></T></table></DIV><DIV>&nbsp;</DIV><DIV>why the event will be raised only the second click ... The arrow keys are not fully working ...</DIV></DIV><DIV>&nbsp;</DIV><DIV><strong><FONT color=#0000ff>Answer:</FONT></strong></DIV><DIV>What are you trying to accomplish?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><strong><FONT color=#ff0000>Question:</FONT></strong></DIV><DIV><DIV>BTW: why there&nbsp;is no&nbsp;method to programmatically repaint the visible part of the ReportControl? Like the standard Visual Basic <U>Refresh</U>? (Redraw doesnt work).</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><DIV><strong><FONT color=#0000ff>Answer:</FONT></strong></DIV><UL><LI><H4 ="dxh4">Description</H4><P><FONT color=#ffffff>Redraws</FONT> the <a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol.html" target="_blank"><U>ReportControl</U></A></P><!--DX end --><!--DX start ="Syntax" lang="VB" at="<div =Specific Name=Syntax_VB><H4 =dxh4>$$Syntax$$</H4><P>%%Syntax%%</P></DIV>" --><DIV ="Specific" Name="Syntax_VB"><H4 ="dxh4">Syntax</H4><P><PRE lang=VB ="syntax"><strong>Public Sub <FONT color=#ffffff>Redraw</FONT></strong>()<strong> </strong></PRE><P></P></DIV><!--DX end --><!--DX start ="edItemList" scrap="ETERS_LIST" ="eter" source="Item" ="" at="<H4 =dxh4>$$ParameterList$$</H4>%%filtereditemlist%%" --><!--DX end --><!--DX start ="TaggedComment" source="Item" id="##RETURNS" at="<H4 =dxh4>$$Return_Type$$</H4><P>%%comment%%</P>" --><!--DX end --><!--DX start ="TaggedComment" source="Item" id="##REMARKS" at="<H4 =dxh4>$$Remarks$$</H4><P>%%comment%%</P>" --><H4 ="dxh4">Remarks</H4><P>This method needs to be called any time you change a property in the <a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol~PaintManager.html" target="_blank"><U>ReportPaintManager</U></A>.&nbsp; This is required to <FONT color=#ffffff>redraw</FONT> the visual changes that you make to the <a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol.html" target="_blank"><U>ReportControl</U></A>.&nbsp; For example, you would need to call the <FONT color=#ffffff>Redraw</FONT> method after you change the grid line style.</P><!--DX end --><!--DX start ="sourcecode" at="<H4 =dxh4>$$Source_Code$$</H4><table border=0 cellpadding=0 cellspacing=0 =sourcecode><tr><td nowrap>%%sourcecode%%</td></tr></table>" --><!--DX end --><!--DX start ="TaggedComment" source="Item" id="##EXAMPLEINTRO" at="<H4 =dxh4>$$Example$$</H4><P>%%comment%%</P>" --><!--DX end --><!--DX start ="edItemList" scrap="INLINE_EXAMPLE" ="Example" source="Item" ="=inline" Noer="True" NoFooter="True" at="%%taggedcomment:source=item,id=##EXAMPLEINTRO,blankat=<H4 =dxh4>$$Example$$</H4>,format= %%%%filtereditemlist%%" --><LI><H4 ="dxh4">Description</H4><P><FONT color=#ffffff>Populates</FONT> the&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol.html" target="_blank"><U>ReportControl</U></A>'s with&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRow.html" target="_blank"><U>ReportRow</U></A> collection with the data contained in the&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRecord.html" target="_blank"><U>ReportRecord</U></A>s</P><!--DX end --><!--DX start ="Syntax" lang="VB" at="<div =Specific Name=Syntax_VB><H4 =dxh4>$$Syntax$$</H4><P>%%Syntax%%</P></DIV>" --><DIV ="Specific" Name="Syntax_VB"><H4 ="dxh4">Syntax</H4><P><PRE lang=VB ="syntax"><strong>Public Sub <FONT color=#ffffff>Populate</FONT></strong>()<strong> </strong></PRE><P></P></DIV><!--DX end --><!--DX start ="edItemList" scrap="ETERS_LIST" ="eter" source="Item" ="" at="<H4 =dxh4>$$ParameterList$$</H4>%%filtereditemlist%%" --><!--DX end --><!--DX start ="TaggedComment" source="Item" id="##RETURNS" at="<H4 =dxh4>$$Return_Type$$</H4><P>%%comment%%</P>" --><!--DX end --><!--DX start ="TaggedComment" source="Item" id="##REMARKS" at="<H4 =dxh4>$$Remarks$$</H4><P>%%comment%%</P>" --><H4 ="dxh4">Remarks</H4><P><P></P><P>&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRows.html" target="_blank"><U>ReportRows</U></A>(which are associated with a <a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRecord.html" target="_blank"><U>ReportRecord</U></A>)&nbsp;will not be added to the <a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol.html" target="_blank"><U>ReportControl</U></A>'s view until the <FONT color=#ffffff>Populate</FONT> method is called.</P><P>The changes made to the&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol~GroupsOrder.html" target="_blank"><U>GroupsOrder</U></A> or&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol~SortOrder.html" target="_blank"><U>SortOrder</U></A> collections will only take effect after the <FONT color=#ffffff>Populate</FONT> method is called.</P><P></P><P><FONT color=#ffffff>Populate</FONT> can be called after each record is added, or after you are done adding all records.&nbsp;&nbsp; If at any time&nbsp;you&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRecords~Add.html" target="_blank"><U>add</U></A> or&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRecords~RemoveAt.html" target="_blank"><U>delete</U></A> <a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v13.4.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportRecord.html" target="_blank"><U>ReportRecords</U></A>, the changes&nbsp;will not be visible until the <FONT color=#ffffff>Populate</FONT> method is called.</P>&nbsp;</LI></UL></DIV><DIV>So any changes made in Record Collection (adding or removing) you have to call .Populate otherwise changes don't show. Changing "Visual properties" need&nbsp;.Redraw method.</DIV><DIV>&nbsp;</DIV><DIV>btw Do not hesitate to post your problems,&nbsp;there's always someone to help you a little further. I know ReportControl is an advanced control when you start using it, I know, I have been there <img src="http://forum.codejock.com/smileys/smiley2.gif" height="17" width="17" border="0" alt="Wink" title="Wink" />&nbsp;I believe it's a great control once you know how&nbsp;to use it (and&nbsp;problems are solved&nbsp;in near future...)</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;</DIV></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 05 Oct 2010 14:36:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60705&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60705</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) :   jpbro wrote:Looks like a bug...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60699&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60699</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 05 October 2010 at 9:59am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by jpbro" alt="Originally posted by jpbro" style="vertical-align: text-bottom;" /> <strong>jpbro wrote:</strong><br /><br />Looks like a bug with AutoColumnSizing = True when there are no auto-sizable columns.<BR><BR>Try putting .AutoColumnSizing = False in your Form_Load event immediately before you add your columns. <BR></td></tr></table> <DIV>&nbsp;</DIV><DIV>I dont know how you found this hack but ... it works! I have spent about one day over this.</DIV><DIV>&nbsp;</DIV><DIV>I am trying to implement a way to select a column. In the past&nbsp;I did this with a single statement:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode">VsFlex.SelectionMode = flexSelectionByColumn</pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Now I need to use </DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReportControl .SetCustomDraw xtpCustomDrawItem</DIV><DIV></pre></td></tr></table></DIV><DIV>and the ReportControl_DrawItem event to paint the column items. </DIV><DIV>&nbsp;</DIV><DIV>So with this code (working now)</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>With ReportControl</DIV><DIV>&nbsp;&nbsp;&nbsp; If .HitTest(X, Y).ht = xtpHitTestReportArea Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set .FocusedColumn = .HitTest(X, Y).Column<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set .FocusedRow = .HitTest(X, Y).Row<BR>&nbsp;&nbsp;&nbsp; End If</DIV><DIV>End With<BR></pre></td></tr></table></DIV><DIV>I can set the FocusedColumn and:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>ReportControl_DrawItem()</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Column.Index = rpt.FocusedColumn.Index Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.BackColor = vbRed<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.BackColor = vbWhite<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>End Sub</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>I reach the goal. But another bug is that I cannot use:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>ReportControl.SelectionEnable = False</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>why the event will be raised only the second click ... The arrow keys are not fully working ...</DIV><DIV>&nbsp;</DIV><DIV>Its a true neverending story ...</DIV><DIV>&nbsp;</DIV><DIV>BTW: why there&nbsp;is no&nbsp;method to programmatically repaint the visible part of the ReportControl? Like the standard Visual Basic <U>Refresh</U>? (Redraw doesnt work).</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by jpbro" alt="Originally posted by jpbro" style="vertical-align: text-bottom;" /> <strong>jpbro wrote:</strong><br /><br />Also, please open a support ticket at https://support.codejock.com so that there is a chance that this will be fixed for the next release.<BR></td></tr></table> </DIV><DIV>&nbsp;</DIV><DIV>I did it this morning (for me) after this post. </DIV><DIV>&nbsp;</DIV><DIV>Thank you!</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 05 Oct 2010 09:59:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60699&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60699</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : Looks like a bug with AutoColumnSizing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60696&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60696</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 05 October 2010 at 8:51am<br /><br />Looks like a bug with AutoColumnSizing = True when there are no auto-sizable columns.<br><br>Try putting .AutoColumnSizing = False in your Form_Load event immediately before you add your columns. <br><br>Also, please open a support ticket at https://support.codejock.com so that there is a chance that this will be fixed for the next release.<br><br>If Aaron is reading - perhaps you could add this to your bug list?<br><br>Thanks.<br><br>]]>
   </description>
   <pubDate>Tue, 05 Oct 2010 08:51:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60696&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60696</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Where am I wrong now? (selectionbycolumn) : I am lookingfor substitute the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60692&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60692</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 17374<br /><strong>Posted:</strong> 05 October 2010 at 3:37am<br /><br />I am looking&nbsp;for substitute the "old" tdbgrid/vsflex with CJ ReportControl but, for each feature I resolve, two problems raise... <DIV>&nbsp;</DIV><DIV>The last one:</DIV><DIV>&nbsp;</DIV><DIV>In a new form, insert a ReportControl and paste this code:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>Option Explicit</DIV><DIV>Private Sub Form_Load()<BR>Dim i As Integer, j As Integer</DIV><DIV>&nbsp;&nbsp;&nbsp; Width = 7200<BR>&nbsp;&nbsp;&nbsp; Height = 4500</DIV><DIV>&nbsp;&nbsp;&nbsp; With ReportControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To 5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Columns.Add i, "Col " &amp; Chr$(65 + i), 150, False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To 20<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With .Records.Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For j = 0 To 5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .AddItem Chr$(65 + j)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next j<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Populate<BR>&nbsp;&nbsp;&nbsp; End With</DIV><DIV>End Sub</DIV><DIV>Private Sub Form_Resize()<BR>&nbsp;&nbsp;&nbsp; ReportControl.Move 0, 0, ScaleWidth, ScaleHeight<BR>End Sub</DIV><DIV>Private Sub ReportControl_MouseDown(Button As Integer, Shift As Integer, x As Long, y As Long)<BR>&nbsp;&nbsp;&nbsp; If ReportControl.HitTest(x, y).ht = xtpHitTestReportArea Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "HitTest: ReportArea"<BR>&nbsp;&nbsp;&nbsp; ElseIf ReportControl.HitTest(x, y).ht = xtpHitTestUnknown Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "HitTest: Unknown"<BR>&nbsp;&nbsp;&nbsp; End If<BR>End Sub</DIV><DIV></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Run it. As you can see you can click the column A, B or C (the debug window states you are in the ReportArea).</DIV><DIV>Now, <U>use the mouse</U> and the horizontal scrollbar to show columns D,E and F. Click over the report control. You cannot select nothing (the debug window states you are in a Unknown Area, i.e. "no part of the ReportControl&nbsp;is at the given X and Y coordinates").</DIV><DIV>&nbsp;</DIV><DIV>Set full screen and you can see you can select what you want.</DIV><DIV>&nbsp;</DIV><DIV>This is a very basic grid behaviour. The basic grid included in VB about 15 years ago did this the corect way.</DIV><DIV>&nbsp;</DIV><DIV>Am I the only one that use this or am I not able to understand this control?</DIV><DIV>TY<BR></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 05 Oct 2010 03:37:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17374&amp;PID=60692&amp;title=solved-where-am-i-wrong-now-selectionbycolumn#60692</guid>
  </item> 
 </channel>
</rss>