select spesific 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=4116
Printed Date: 02 January 2025 at 9:42am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: select spesific row
Posted By: barianto
Subject: select spesific row
Date 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?
|
Replies:
Posted By: sserge
Date 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
|
Posted By: barianto
Date 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
|
Posted By: barianto
Date 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...
|
Posted By: SuperMario
Date Posted: 04 May 2006 at 1:12pm
maybe use MoveLastColumn or MoveToColumn then?
|
Posted By: sserge
Date Posted: 04 May 2006 at 3:01pm
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
|
|
Posted By: barianto
Date Posted: 04 May 2006 at 10:10pm
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
|
Posted By: sserge
Date 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
|
|