I have a Listiview (lvIssues) with a list of items and I would like the Selected ItemTemplate to take effect when I click the ListView Select button for the item corresponding to that same row.
Instead it does not display on the first button click but instead it displays when I click the items select button again or when I click a different rows select button.
I have tried using
lvIssues.SelectedIndex = e.NewSelectedIndex;
in the lvIssues_SelectedIndexChanging event code
lvIssues.SelectedIndex = dataItem.DisplayIndex;
in the lvIssues_ItemCommand event code
I can use code in either of these places to do another task (displaying an image of the item selected) that takes effect immediately on clicking the Select button but the SelectedItem does not take effect until I click the button again (or click a button on a different row)
I click the row 2 button and the image for item 2 appears but the listview template is unchanged.
Then I click the row 3 button and the image for item 3 appears AND the template is changed for row/item 2.
Then I click the row 1 button and the image for item 1 appears AND the template is changed for row/item 3.
This is driving me crazy. Any ideas? I only f
View Complete Post