strataListView(Index was outside the bounds of the array)


Author
Message
Jocelyn Dagrain
Jocelyn Dagrain
StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)StrataFrame Novice (68 reputation)
Group: Forum Members
Posts: 20, Visits: 127
Bonjour
using the strataListView I am trying to disable and enable some toolstrip button
when I lost focus of the strataListView I received this error message (Index was outside the bounds of the array)
can you help me please thank you.

private void strataListView1_SelectedItemChanged(object sender, EventArgs e)
        {
           
            if (strataListView1.SelectedItems[0].Selected == true)
            {
                this.toolStripButtonEdit.Enabled = true;
                this.toolStripButtonDelete.Enabled = true;
            }
            else
            {
                this.toolStripButtonEdit.Enabled = false;
                this.toolStripButtonDelete.Enabled = false;
            }
         }

NB. With the standard strataframe listview I used this code

  private void listView_SelectedIndexChanged(object sender, EventArgs e)
        {

            this.toolStripButtonEditGroup.Enabled = listView.SelectedItems.Count > 0;
            this.toolStripDeleteGoup.Enabled = listView.SelectedItems.Count > 0;

        }

Reply
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Yes, for now Smile. The StrataListView is still being enhanced, and that is simply one of the features that hasn't made it into it yet, though it will be there before the "final" release.
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