Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - select spesific row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

select spesific row

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

Joined: 01 May 2006
Location: Indonesia
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote barianto Quote  Post ReplyReply Direct Link To This Post Topic: select spesific row
    Posted: 03 May 2006 at 10:09am
Hi,

(I have been search to old post :) )

I need to focused the last row of ReportControl that newly added. I able to do that with this code:

    Dim LastRow As Long
    LastRow = wndReportControl.Rows.Count - 1
    wndReportControl.FocusedRow = wndReportControl.Rows(LastRow)

but when the column is index, code above just failed.

i also notice built in method use by ReportCOntrol to navigation, something like MoveNext, MoveFIrstRow, MoveLastRow, etc. Can we use it in our code? how?

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: 03 May 2006 at 12:02pm
It depends on which version of the control do you use.
In last versions there is an object ReportNavigator, which could be used in a following way: ReportControl.Navigator.MoveLastRow

--
WBR,
Serge
Back to Top
barianto View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2006
Location: Indonesia
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote barianto Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2006 at 9:37pm
i'm using codejock 10.1.1

when Column is index ReportControl.Navigator.MoveLastRow also fail to go to the last record instead it is go to the last row of collection
Back to Top
barianto View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2006
Location: Indonesia
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote barianto Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2006 at 12:19pm
anyone can help me how to set focused to the newly added row in indexed column. Or how to chechk wheter or not a column indexed, pls...
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2006 at 1:12pm
maybe use MoveLastColumn or MoveToColumn then?
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: 04 May 2006 at 3:01pm
Originally posted by barianto barianto wrote:


when Column is index ReportControl.Navigator.MoveLastRow also fail to go to the last record instead it is go to the last row of collection


You can always find a necessary row by record and move there.
Example:

wndReportControl.Navigator.MoveToRow wndReportControl.Rows.FindRow(wndReportControl.Records(wndRe portControl.Records.Count - 1)).Index

Back to Top
barianto View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2006
Location: Indonesia
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote barianto Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2006 at 10:10pm
Quote
You can always find a necessary row by record and move there.
Example:

wndReportControl.Navigator.MoveToRow wndReportControl.Rows.FindRow(wndReportControl.Records(wndRe portControl.Records.Count - 1)).Index



Did you try above code? it come up with error 91
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: 05 May 2006 at 4:34pm
yes, I've tried and it works if you have at least 1 record in the control and it is already populated.

Of course it would be better to do that not in 1 line, but with checking each property for Nothing. Look which one is nothing, and you'll see what's the problem is.

--
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.