Print Page | Close Window

Need to get value from particular 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=4499
Printed Date: 19 September 2024 at 6:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Need to get value from particular Row
Posted By: cybeh
Subject: Need to get value from particular Row
Date Posted: 27 June 2006 at 11:26am
Hi all,

I have the index for particular row, and I would like to get the value from record..may I know how....

dim lUseRecord as long

lUseReord = wndReportControl.SelectedRows.Rows(0).index   'So, I have the index here

now, wut if I would like to do something like this

myID = wndReportControl.Rows(lUseRecord).Record.Item(0).value

this code return me error.... Please advice.






Replies:
Posted By: sserge
Date Posted: 27 June 2006 at 5:07pm
Wouldn't it be enough to write: wndReportControl.SelectedRows.Rows(0).Record.Item(0).value ?

And note that if you have grouping enabled, the first row might not have corresponding Record because it could be a Group row -- check Report for Nothing before accessing its properties.

--
WBR,
Serge


Posted By: cybeh
Date Posted: 27 June 2006 at 7:32pm
Hi, I can't do this. This is due to, I might want to get some previous selected row value and not current selected row.


Posted By: sserge
Date Posted: 28 June 2006 at 5:54am
Ok, I see.
In this case I'd recommend to store Index of the Record, not the Row.

lUseRecord = wndReportControl.SelectedRows(0).Record.Index
...
myID = wndReportControl.Records(lUseRecord).Item(0).Value


--
WBR,
Serge



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