Getting the selected rows
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1601
Printed Date: 09 May 2025 at 10:01pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Getting the selected rows
Posted By: amorton
Subject: Getting the selected rows
Date Posted: 30 December 2004 at 4:13am
I have not been able to work out how to access the collection of selected rows in the report control.
The control has a child ReportSelected that has methods to add and
delete rows from the collection and a count but no method to get a row
from the collection. I can loop over the items in the collection using
a for each loop but i just want to get the selected row.
This seems like a really dumb question and it is, but can any one help ? How do i get the selected row in the report control ?
thanks
|
Replies:
Posted By: SuperMario
Date Posted: 30 December 2004 at 6:22am
If you only want the single selected row then:
ReportControl.FocusedRow
For multiple rows:
ReportControl.SelectedRows
|
Posted By: amorton
Date Posted: 30 December 2004 at 6:34am
It appears possible for the focusedRow to not be in the selectedRows collection. If i follow these steps...
1) with an item selected in the list press and hold ctrl, then press key down a few times.
2) the original row in the list will retain the selection back color
3) the focus rectangle will move down the list and the count of objects
in the selectedRows collection will remain at 1 (when tested in the
keydown event).
4) in the keydown event the Selected property of the focusedRow is false
So the row with focus may not be selected. This would be easier if
there was an indexer/item/row property on the selected row
collection. For now i need to iterate over the collection using
for-each which is a little messy
Could you add this in the next release ?
thanks
aaron
|
|