Completed
Last Updated: 04 Oct 2016 08:52 by ADMIN
ADMIN
Dimitar
Created on: 18 Jul 2016 10:07
Category: ListView, CardView and CheckedListBox
Type: Bug Report
1
FIX. RadListView - one cannot cancel the change in the CurrentItemChanging event.
To reproduce:
private void RadListView1_CurrentItemChanging(object sender, Telerik.WinControls.UI.ListViewItemChangingEventArgs e)
{
    e.Cancel = true;
}

Workaround:

private void RadListView1_SelectedIndexChanged(object sender, EventArgs e)
{
    this.radListView1.SelectedIndexChanged -= RadListView1_SelectedIndexChanged;
    this.radListView1.SelectedIndex = 0;
    this.radListView1.SelectedIndexChanged += RadListView1_SelectedIndexChanged;
}

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
ADMIN
Ralitsa
Posted on: 04 Oct 2016 08:52
A SelectedItemChanging event will be included in our next release - Telerik UI for WinForms R3 2016 SP1. The SelectedItemChanging occurs when a data item is about to be selected. This event allows the operation to be canceled. Keep in mind that the CurrentItemChanging/CurrentItemChanged events won`t be fired too when cancelling the selection.
A
Posted on: 10 Aug 2016 14:23
Awesome. Thanks for the quick follow-up.