Dear All,
When I remove Item from a delete command button,
Item gets removed, But focus is not back to the Next or Previous
(depending on deleted Item) Item of list box.
My code is as follows
private void cmdDelete_Click(object sender, EventArgs e)
{
int selectedIndex = this.ListBox.SelectedIndex;
if (selectedIndex != -1)
{
this.ListBox.tems.RemoveAt(selectedIndex);
this.ListBox.Focus();
}
}
Thanks
Redgs