Getting the selected rows |
Post Reply |
Author | |
amorton
Newbie Joined: 29 December 2004 Location: United Kingdom Status: Offline Points: 10 |
Post Options
Thanks(0)
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
If you only want the single selected row then:
ReportControl.FocusedRow For multiple rows: ReportControl.SelectedRows |
|
amorton
Newbie Joined: 29 December 2004 Location: United Kingdom Status: Offline Points: 10 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |