Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Getting FocusedRow.Record.Tag value
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting FocusedRow.Record.Tag value

 Post Reply Post Reply
Author
Message
mstuart View Drop Down
Groupie
Groupie


Joined: 06 April 2010
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote mstuart Quote  Post ReplyReply Direct Link To This Post Topic: Getting FocusedRow.Record.Tag value
    Posted: 17 December 2010 at 2:16pm
Hi all,
How do I get from a ReportControl after it has just been loaded in a VB6 Form_Load event, the first rows record tag value?

I am using the ReportControl.FocusedRow.Record.Tag method in the ReportControl_SelectionChanged event to get the record ID. But it hasn't had focus yet, so there is no ID from the Tag.

In this situation, the user hasn't clicked onto the ReportControl yet. The first thing they do is click on the CommandBar "Edit" button, expecting to open the record detail form. In the record Tag value is the ID to the record to open. Since this event hasn't fired, I don't have the ID.

Now that I'm thinking about this, should I put the ReportControl.FocusedRow.Record.Tag event in the Commandbars_Execute event? But I would have to force to find the focused row, right?

Not sure on this.

Anybody, got ideas or ways to handle this?

Regards,
Mark Stuart

Product: Xtreme SuitePro (ActiveX) v13.2.1
Platform: WinXP (32bit)/Win7 (64bit)
Language: VB6 (SP6), Magic eDeveloper v9.4, uniPaaS v1.9
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2010 at 2:30am

Hi Mark,

You could use FocusChanging event for this, everytime user clicks or uses arrow key to select another row, this event fires. Now, to get first ID on startup you need to change focus on another row because FocusChange event doesn't fire at startup (row is selected but nothing more) for example:

wndReportControl.Navigator.MoveToRow 1
wndReportControl.Navigator.MoveToRow 0
 
and now FocusChange event fires and you are able to get value from first row.
 
Hope this helps Wink
     
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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.