What is the best approche to emulate the (auto navigate) available in the standard listview


What is the best approche to emulate the (auto navigate) available in...
Author
Message
Jocelyn Dagrain
Jocelyn Dagrain
StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)
Group: Forum Members
Posts: 20, Visits: 127
thank you for the observation I made de change Smile
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Jocelyn,



I am glad it worked for you and thanks for sharing the code.



One observation, I believe the SeekToPrimaryKey() method will return True/False, so if that is the case you may want to test that before updating txtNote.Text = this.notesBO1.Tbl_Notes;

Edhy Rijo

Jocelyn Dagrain
Jocelyn Dagrain
StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)
Group: Forum Members
Posts: 20, Visits: 127
Thank you

I was able to do it using (SeekToPrimaryKey) in the SelectedItemChanged event

private void strataListViewNotes_SelectedItemChanged(object sender, EventArgs e)
        {
            if (strataListViewNotes.SelectedItems.GetLength(0) > 0)
            {
                this.toolStripButtonEdit.Enabled = true;
                this.toolStripButtonDelete.Enabled = true;

                this.notesBO1.SeekToPrimaryKey((Int32)strataListViewNotes.SelectedItems[0].CustomData["PrimaryKey"]);
                txtNote.Text = this.notesBO1.Tbl_Notes;
            }
            else
            {
                this.toolStripButtonEdit.Enabled = false;
                this.toolStripButtonDelete.Enabled = false;
               
            }
        }

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Jocelyn,



Look in the OnSelectedIndexChanged method in the ListView.vb of the source code project MicroFour.StrataFrame.UI\WinForms Controls



There you will find the code that is currently use in the SF ListView and can implement it in your own class until the new listview is released with these features.

Edhy Rijo

Jocelyn Dagrain
Jocelyn Dagrain
StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)StrataFrame Beginner (42 reputation)
Group: Forum Members
Posts: 20, Visits: 127

Bonjour

Using the strataListview

What is the best approche to emulate the (auto navigate) available in the standard listview

Thank you

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