Getting FocusedRow.Record.Tag value |
Post Reply |
Author | |
mstuart
Groupie Joined: 06 April 2010 Location: United States Status: Offline Points: 36 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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
|
|
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.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |