Print Page | Close Window

Add Column Event

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=11584
Printed Date: 18 July 2025 at 10:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add Column Event
Posted By: Fossil
Subject: Add Column Event
Date Posted: 25 July 2008 at 3:39pm
Hi,

Is there any way to determine when a column gets added or removed from the report control from the field chooser.  I know _ColumnOrderChanged captures this, however I only want to know if something gets added not if other things happen such as column location changes or group by box changes which are also covered in this event.

Thanks


-------------
Product: Xtreme SuitePro (ActiveX) version 12.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0



Replies:
Posted By: AndreiM
Date Posted: 27 July 2008 at 6:02am
Hi,
There is no special event for add/remove columns.
But you may store names of visible columns in some collection and check is this changed in ColumnOrderChanged.
As I see this easy to implement.
Also you may use Column.Tag property to identify column.


-------------
Regards,
Andrei Melnik


Posted By: Fossil
Date Posted: 27 July 2008 at 8:30am
Thanks for the advice, I already use the tag for something else, but a collection would work just fine.  If its possible to have it be an enhancement to the control that would be great for future.

-------------
Product: Xtreme SuitePro (ActiveX) version 12.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0


Posted By: Aaron
Date Posted: 27 July 2008 at 1:53pm
Originally posted by AndreiM AndreiM wrote:

Hi,
There is no special event for add/remove columns.
But you may store names of visible columns in some collection and check is this changed in ColumnOrderChanged.
As I see this easy to implement.
Also you may use Column.Tag property to identify column.
 
Andrei,
Add the event and a few thousand users won't have to add code to do it themselves . As I said in my post: Managing columns, also support members are welcome with ideas and maybe you have already implemented some. You're welcome to add them or share with us, Andrei  
 
Thanks in advance


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 27 July 2008 at 5:00pm
Hi Andrei,

The Tag property is useful, but very limited. I use the ComponentOne VSFlexGrid control a lot, and it has some very useful properties: RowData, ColData and CellData. The great thing about these properties is that they accept Variants instead of just strings, so you can create a class with a bunch of your own properties that you want to track for Rows, Columns and individual Cells, and then attach the class to the appropriate property. Similar properties in the ReportControl would be very useful and much more powerful that using Tag.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: AndreiM
Date Posted: 29 July 2008 at 8:23am
Our Tag property is Variant too :).
Folowing objects have Tag property:
  - ReportColumn  
  - ReportRecord
  - ReportRecordItem
 
EXAMPLE:
 
'' Store
    Set Column.Tag = New Collection
    Column.Tag.Add "Column.Tag = Collection"
 
'' Using
    wndReportControl.Columns(3).Tag.Item(1)
 


-------------
Regards,
Andrei Melnik


Posted By: Aaron
Date Posted: 29 July 2008 at 8:31am

Hi,

I did not know that  , I have to read the documentation a bit more than I do now.
 
Thanks for update, this is also very usefull for me
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 29 July 2008 at 11:13am
That's good to know Andrei! I just saw a Tag property, and figured it was the same as the standard VB Tag property. I'll revisit the documentation along with Aaron ;)


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net