I have a User Control that contains a ListView. In the user control's code is this event handler:
protected void listView1_ItemCommand(object source, ListViewCommandEventArgs e)
What's occurring is that I'm explicitly firing an event so that the parent web page can monitor this and take appropriate actions. Thus when the user clicks on a different ListViewItem it triggers the population of associated data elsewhere on the web page.
This all works fine except for one thing: When I first load the control I'm pre-setting the first ListViewItem. Unfortunately, just setting the ListView's SelectedIndex = 0 doesn't fire the aforementioned event handler.
So I started investigating how to call "listView1_ItemCommand" but couldn't figure out how to instantiate the "e" parameter.
Any ideas of how to resolve this?
View Complete Post