Print Page | Close Window

Getting FocusedRow.Record.Tag value

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=17701
Printed Date: 15 November 2024 at 6:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Getting FocusedRow.Record.Tag value
Posted By: mstuart
Subject: Getting FocusedRow.Record.Tag value
Date 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



Replies:
Posted By: Aaron
Date 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....



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