Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Getting the selected rows
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting the selected rows

 Post Reply Post Reply
Author
Message
amorton View Drop Down
Newbie
Newbie


Joined: 29 December 2004
Location: United Kingdom
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote amorton Quote  Post ReplyReply Direct Link To This Post Topic: Getting the selected rows
    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

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: 30 December 2004 at 6:22am
If you only want the single selected row then:
    ReportControl.FocusedRow

For multiple rows:
    ReportControl.SelectedRows
Back to Top
amorton View Drop Down
Newbie
Newbie


Joined: 29 December 2004
Location: United Kingdom
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote amorton Quote  Post ReplyReply Direct Link To This Post 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


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