Group: StrataFrame Users
Posts: 144,
Visits: 618
|
Hi Edhy
thanks for your suggestions but I can not really understand what you mean by writing this:
<< When you implement the Up/Down feature, the listview will keep track of the selected index which will be reported in the ListView.SelectedIndexChanged, just by using the code Ivan suggested will always get you the selected item in the list which you can identify in your BO or your table if you previously updated the .Tag property with the PK value you can later reference to your record.>>
Lets get a little bit more example like
1. I Add Items to a stratalistview and set an index-value in the tag-property of each item. If I have 10 items i start with 1 and finish with 10 ( or 0 to 9).
2. If I change the selected item I can get the value of the tag-property. This is what I understand from Ivans proposal.
This is all clear, but what do I have to do something like this:
1. Let's say the selected item tag is 1. The user wants to press the down-arrow-key to change the selected
item to the next item in the stratalistview (to simple skip through the item-list.
To do this, as I understand it, there should be some code in
the keypress-event of the stratalistview (or form with key-preview) which handles the keypress in a way like that:
if keypressed = DownArrowkey
' what has to happen here to skip through the stratalistview?
Endif
Using a BO might be possible, but before I add an additional layer of complexity to a relative simple way of presenting data (No need to do anything than showing this data, which is not some kind of database but just plain ansi-data) I first would like to know what is possible and what not with the stratalistview. If it is clearly designed just to work with BOs, I accept this and would have to consider using a BO or using another tool for that specific task which would be a pity because of the wonderful visual appearance of the stratalistview with its possibilities of Header and footer subitems which is really useful for this special task.
Best regards
Thomas
|