This is the code that apparently fixes the problem. The code should replace the existing methods in FastObjectListDataSource. Originally I fixed the issue by using SelectedObjects instead of SelectedIndices, but that fix requires changes in FastObjectListView as well, and likely a new method in IVirtualListDataSource. This fix is more elegant, if it works. public override void InsertObjects(int index, ICollection modelObjects) { this.fullObjectList.InsertRange(index, modelObjects); this.FilterObjects();...
New code uses C#6 string interpolation, not available in VS2012 and earlier. All four lines in DropSink.cs are calls to System.Diagnostics.Debug.WriteLine.
If you discovered an unexpected behavior I suggest you try to replicate it in olv demo project, then describe what you had to do to replicate it, and also describe the expected behavior, and also the actual behavior. This way we can all confirm your findings. For a description example take a look at my previous post. Using the demo project enables Phillip to fix the issue and verify that the issue has been actually fixed.
I can confirm this problem. It can be observed in demo, with some code tweaking. In TabFastList.buttonRemove_Click method replace this line: this.ListView.RemoveObjects(this.ListView.SelectedObjects); with this line: this.ListView.RemoveObjects(this.ListView.CheckedObjects); Check the first row (Wilhelm Frat) and select the second and the last row (Alana Roderick and Mister Null) and click Remove. We expect the first row to be removed and selection to persist. First row will be removed, but Frank...
I can confirm this problem. It can be observed in demo, with some code tweaking. In TabFastList.buttonRemove_Click method replace this line: this.ListView.RemoveObjects(this.ListView.SelectedObjects); with this line: this.ListView.RemoveObjects(this.ListView.CheckedObjects); Check the first row (Wilhelm Frat) and select the second and the last row (Alana Roderick and Mister Null) and click Remove. We expect the first row to be removed and selection to persist. First row will be removed, but Frank...
To filter a TreeListView I set a filter to ModelFilter property. The problem is when I set a new filter over the existing one the treeview's connecting lines are not drawn properly for the model object that is not the only visible object anymore. Here's an example using OLV demo: Go to TreeListView tab in demo. If you have three drives three root nodes are shown: C:\, D:\, and E:\ (use flash drives if needed), and they are properly connected with lines. Type D: in filter. Now only D:\ root node is...
I wanted to tweak TextMatchFilter to match all given strings, instead of any. Had to copy its code, instead of inheriting it, because MatchingStrategies property is private. So I copied the code, changed it, and my new filtering works. But I lost text highlighting. Looking through code I found that HighlightTextRenderer has Filter property of type TextMatchFilter. I propose that this property should be of some interface type that any filter could implement, including TextMatchFilter. I guess I can...
I have a virtual OLV that handles pages of sorted objects received from web service (service does the sorting). User can also insert an object, and my VirtualListDataSource handles that when insert index is known. But how can I deduce the insert index of a sorted list if I don't have all items in the list? I would like to have insert functionality that preserves the ordering and also does the minimum of web calls. Maybe I could directly manipulate my VirtualListDataSource, instead of doing the insert...