Thank you for your question.
The current implementation of the "DataRequested" event of the RadDataBoundListBox, prevents it to be fired again if it fails, i.e. if the data in the "ItemsSource" is not changed. There is a possible "workaround", which consists of adding and immediately removing a "fake" item in order to change the Items collection. We will further investigate this issue in order to find a more proper solution.
Here is the revisited code for the "neakylist_DataRequested" event handler:
sender, EventArgs e)
//if (rand.Next(0, 1) == 1)
(i++ % 2 == 0)
//neakylist.DataVirtualizationMode = Telerik.Windows.Controls.DataVirtualizationMode.None;
//neakylist.DataVirtualizationMode = Telerik.Windows.Controls.DataVirtualizationMode.OnDemandAutomatic;
Items.RemoveAt(Items.Count - 1);
I am assuming that you don't actually need to change the DataVirtualizationMode, but if this is intended, you can safely uncomment these lines. Also, please note that
(rand.Next(0, 1) == 1) returns almost always "false" so it is not reliable example for testing such situation, since the Items collection is not actually changed, although the "DataRequested" event is actually fired. In this code snippet I used a simple counter, which is incremented so the "if" branch is executed and items are actually added to the collection.
Please don't hesitate to contact us again, if the suggested workaround is not applicable to your scenario or if you encounter some problems with this approach.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.