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 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

 

 

 

 

 

 

 





 


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
Hi Thomas,
Like I said before, I cannot help you adding the functionality of Up/Down because I have not done that before, and I am not a member of the SF team.  All I know is that this control was released under beta and is not feature completed so only the SF team can provide a more direct answer of what features will this control be able to handle.

Now, knowing what what we know about the control, I would suggest the following:
  1. Look at the source code of the standard listview and see if the Up/Down feature is implemented and try to add that functionality to the StrataListView, if you have any issues, post the sample application here and we all can try to help out,  or
  2. Wait for somebody from the SF team to address this post, probably this functionality has already been implemented and not released.


Edhy Rijo

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
Hi Thomas,

A quick look at the StrataListView source code reveals that they added code to handle the Key.Up/Down but the code in the OnKeyUp event is commented out, so either they had an issue with the code or something else.

With this information you can either subclass the StrataListView as I had done and try to implement the OnKeyUp and the ManageKeyStroke() method or just wait for the SF team response.

In case you have not found out yet, StrataListView is in the MicroFour StrataFrame UI Expanded project in the "Controls WinForm" folder.

Here is the commented code:

      /// <summary>
         /// Look for certain key combinations on the up
         /// </summary>
         /// <param name="e"></param>
         protected override void OnKeyUp(KeyEventArgs e)
         {
             base.OnKeyUp(e);
             //-- START HERE AGAIN FOR KEYBOARD IMPLEMENTATION
             ////-- Check for valid key strokes
             //if(e.KeyCode == Keys.Down ||
             //   e.KeyCode == Keys.Up)
             //{
             //    ManageKeystroke(e);
             //}
             //-- Reset the ctrl key
             _IsCtrlDown = false;
         }



Edhy Rijo

Edited 14 Years Ago by 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