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

Jan MontanoRank #1,295 · 1.3K reputationPosted Aug 13, 2007, 7:18 PM EDT
{
}
Rajesh Sawant6 reputationPosted Aug 13, 2007, 8:37 PM EDT
Thanks!
Teach me how to think......