c# - Weird listview behavior? -
This issue is making me crazy ..
The range exception to the index for this code messagebox Leads out:
Private Wide Mentabiscilected (Object Sender, TabControl Event Eggles E) {If (MenTab. Selected Tab. Name == "Active DirectoryTib") {ADServSchat.itm [0]. Selected = true; MessageBox.Show (ADServerSelect.Items [0] .text); }}
But if the message box is the result of an event, then it works fine:
Private Zero MainTabs_elected (Object Sender, TabControlEventArgs e) {If (menu tab selected. Tab name == "Active DirectoryTib") {ADServerSelect.Items [0]. Selected = true; }} Private Video TestButton_click (Object Sender, EventErgus E) {Message Box. Show (adersvercomlect items. [0]. Text); }
Any help would be greatly appreciated.
Looks like items have been added in listview since the maintab was selected from the event. Can you see it?
Comments
Post a Comment