Print Page | Close Window

Get the handle of the above row

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


Topic: Get the handle of the above row
Posted By: mellysully
Subject: Get the handle of the above row
Date Posted: 27 January 2011 at 6:42am
Hi
 
Do you know how to select the row and set it to a handle variable above the one I selected? so that I can update/change the icon depends on its child.
 
Record 1
   Child 1
   Child 2
Record 2
    Child 1
    Child 2
 
I selected the row shown pink highlighted and want to get the handle from child 1 to change the icon.
 
Sample code would be great, thank you.
 
 



Replies:
Posted By: Aaron
Date Posted: 28 January 2011 at 2:39am

Hi,

Something like this:

wndReportControl.Rows(wndReportControl.SelectedRows(0).Index - 1).record.Item(0).Icon = ....

SelectedRows collection contains all selected rows, since you only selected one row, SelectedRows(0) is the row you need. Get the index minus one and you have the row just above the selected row.
 
Maybe you can use BeforeDrawRow event to change icon? With this event you are able to change 'only' visual aspects and leave the records (as you originally added) unchanged.
 
I don't know why you want to change icon, maybe uploading screenshot is best way to show what you need 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