Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Need to get value from particular Row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Need to get value from particular Row

 Post Reply Post Reply
Author
Message
cybeh View Drop Down
Groupie
Groupie
Avatar

Joined: 27 December 2005
Location: Malaysia
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote cybeh Quote  Post ReplyReply Direct Link To This Post Topic: Need to get value from particular Row
    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.



Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cybeh View Drop Down
Groupie
Groupie
Avatar

Joined: 27 December 2005
Location: Malaysia
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote cybeh Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
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.172 seconds.