Strataframe Listview Questions


Author
Message
Thomas Holste
Thomas Holste
Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi there,

after a while I started working on my new app again and encountered some

problems I can't solve by myself. I started an app which uses the

strataframe listview which really impresses me because of the wonderful

layout/design-options but I got two problems where I  need some help.

At first I'd like to tell you that the listview is populated by adding item with

the listview.items.add-method.

The first problem is, that I can not navigate with the up- and down-keys

through the list. I had a look at your listview-samples, navigating with up-

and down-key doesn't work there too. Am I doing something wrong or do

I have to implement this by myself. If yes, how is this done?

The second problem ist that I haven't figured out yet how to determine

the position within the list which is currently selected. For example say

that the listview has 15 items, how do I determine the selected item?

I checked all properties and their values in the debugger, but haven't

found a way yet.

Thanks a lot for your help and best regards

Thomas
Replies
Thomas Holste
Thomas Holste
Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Ivan,

thanks for your answers

<<The standard StrataFrame listview will let you use the arrow keys for navigation. Up to now I hadn't noticed the StrataListView wouldn't.>>

It would be good and save me some time to definitely know, if the stratalistview supports the arrow-keys (and something might be wrong here) or not. And if not, if this will be implemented in the near future.

<<And for the selected value, you could use the listview "Tag" to store any value you want to fetch later, and then on the ListView.SelectedIndexChanged method and test on your ListView.SelectedItems(0).Tag value.  >>

I already thought about that but how do I set an Index or to say it in other words how do I select a special item from outside the grid? For example: If I had to do the key-handling by myself, I would start on Position 1. Now a user presses the arrow-down key and I have to set the selected item to Position 2. Or presses PageDown and I would have to select the last position? How can I do this?

Thanks in Advance and best regards

Thomas
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thomas Holste (7/10/2011)
I already thought about that but how do I set an Index or to say it in other words how do I select a special item from outside the grid? For example: If I had to do the key-handling by myself, I would start on Position 1. Now a user presses the arrow-down key and I have to set the selected item to Position 2. Or presses PageDown and I would have to select the last position? How can I do this?


Hi Thomas,

If I understand you correctly, you really don't need to set any index for the selected item.  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.

Even thought you may consider overkill to use a BO, whatever you may loose may be worthy if it will make your development process and code easier.  BO are very useful to manipulate the data and unless you are dealing with many thousands of records, IMHO there is not a realistic penalty in performance.  I have applications that deals with thousands of records and a lot of data manipulations and the BO features like GetEnumerable, Filter, Seek, Navigate, CopyDataFrom just to mention a couple, makes my life easier with much less code than just using a native data table with twice or triple the code needed to handle the data manipulation.

At this point, if you still having issues with the StrataListView, I would suggest you post a basic sample where we can take a look and help you with the implementation you need.  Since I don't know when new updates will be released from the SF team, I even went ahead and added some functionality from the old listview by simply looking at its source code and implement some of them in the new one, nothing perfect but at least workable for my project until new updates are available, you can find the post here: http://forum.strataframe.net/FindPost28459.aspx


Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search