Git Product home page Git Product logo

geomatics-io / objectlistview Goto Github PK

View Code? Open in Web Editor NEW
108.0 10.0 58.0 31.57 MB

ObjectListView is a .NET ListView wired on caffeine, guarana and steroids. More calmly, it is a C# wrapper around a .NET ListView, which makes the ListView much easier to use and teaches it lots of neat new tricks.

Home Page: http://objectlistview.sourceforge.net/cs/index.html

License: GNU General Public License v3.0

C# 100.00%
csharp listview winforms-controls winforms winforms-library dotnet

objectlistview's People

Contributors

christianjunk avatar zhiliangpt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

objectlistview's Issues

FastObjectListView in LargeIcon view with groups

I tried to convert a ListView in LargeIcon view to a FastObjectListView that uses groups. The code throws an exception while trying to define the groups:

"When the ListView is in virtual mode, you cannot enumerate through the ListView items collection using an enumerator or call GetEnumerator. Use the ListView items indexer instead and access an item by index value."

The exception occurs on this line in the code:

channellistView.Groups.Add(new ListViewGroup(category.name, HorizontalAlignment.Left));

I am adding the groups programmatically in the code. I set the flag 'ShowGroups' to true.

Is this possible? How can I add groups to a FastObjectListView in LargeIcon view? Is there a code sample or recipe?

FastObjectListView - MoveObjects() attempts invalid insertion with index -1

When I used MoveObjects() with an index of 0 with a collection of objects that includes the first object (at index 0), I get an IndexOutOfRangeException because it will try to insert objects at index -1.

I narrowed it down to this block of code in MoveObjects():

foreach (object modelObject in modelObjects) {
int i = this.IndexOf(modelObject);
if (i >= 0 && i <= index)
displacedObjectCount++;
}
index -= displacedObjectCount;

Since, the first object (at index 0) will satisfy the if condition, the index will be decreased from 0 to -1.
Should this condition be changed to if (i >= 0 && i < index) instead?

FastObjectListView with custom sorter does not abide by SortOrder.None

I have a FastObjectListView with its custom Sort() defined within its VirtualListDataSource. The issue I'm facing is that even if I set the SortOrder of the FOLV to SortOrder.None, it will still attempt to sort in ascending order whenever any addition / deletion occurs.

I saw that insertion and deletion of objects will always attempt to sort and I followed the issue to this block of code:

// Give the world a chance to fiddle with or completely avoid the sorting process
BeforeSortingEventArgs args = this.BuildBeforeSortingEventArgs(columnToSort, order);
this.OnBeforeSorting(args);
if (args.Canceled)
return;
// Virtual lists don't preserve selection, so we have to do it specifically
// THINK: Do we need to preserve focus too?
IList selection = this.VirtualMode ? this.SelectedObjects : null;
this.SuspendSelectionEvents();
this.ClearHotItem();
// Finally, do the work of sorting, unless an event handler has already done the sorting for us
if (!args.Handled) {
// Sanity checks
if (args.ColumnToSort != null && args.SortOrder != SortOrder.None) {
if (this.ShowGroups)
this.BuildGroups(args.ColumnToGroupBy, args.GroupByOrder, args.ColumnToSort, args.SortOrder,
args.SecondaryColumnToSort, args.SecondarySortOrder);
else if (this.CustomSorter != null)
this.CustomSorter(args.ColumnToSort, args.SortOrder);
else
this.ListViewItemSorter = new ColumnComparer(args.ColumnToSort, args.SortOrder,
args.SecondaryColumnToSort, args.SecondarySortOrder);
}
}

When line 8358 executes, args.SortOrder will be set to SortOrder.Ascending even if the parameter order is set to SortOrder.None due to this block of code:

if (order == SortOrder.None) {
order = this.Sorting;
if (order == SortOrder.None)
order = SortOrder.Ascending;
}

Therefore, execution will reach line 8378 and the CustomSorter will be provided a SortOrder of Ascending instead of None.

.Net 4.8 Rendering and Filters not working, Buttons events working ok, but Column is not showed as Button, just text.

I worked on this problem for a few weeks.....(Demo is working)
You can get my fork and test project to see result. address on the bottom

Problem with new project: When I'm bringing object from ToolBox to new form/control (DataListView, FastDataListView) I can't make IsButtom column look like button. It seems rendering is not working, Can't make filter work (almost duplicate code from the samples, not working)

Properties can't be set in designer mode:
CellPadding- Can't be set at Column properties "Text "text" cannot be parsed. The expected text format is "1"."
Fork @
https://github.com/StrannikVK/ObjectListView2020.git
Test Project:
ObjectListViewTools2020.csproj

readonly

How do you make the cell editable, but it's read-only?
Because I only want the user to copy the cell content and not modify it.

Performance problem with FastObjectListView

Hello,

are you able to resolve the scrolling performance issue mentioned in these threads of the original control ?

https://sourceforge.net/p/objectlistview/discussion/812922/thread/1d466b3b75/

Your ObjectListView fork suffers from the same Problem

Test case : FastObjectListview : 10 text columns, 1000 rows with a hardcoded most simple aspectgetter - a simple string

To create the Problem - Hold the Keyboard down arrow and watch what happens in Task Manager when the control needs to scroll. CPU Time maxes out on the main UI thread. The videos in the link above show the problem as well. Scrolling goes lines by line and UI Thread is locked so bad that no other meaningful operations can be performed when the down/up arrows are kept pressed and the control is scrolling.

Try the same with 20 columns and the control becomes unusable and is anything but "fast"

Try disabling all columns (hide) and leave only the first - scroll now...that is the desired scroll performance.

I am willing to make a donation to the Person/Team that can make a super responsive FastObjectListview (using the base ObjectListview 2.9.1+ code/features) that has no scrolling problem with 20 columns

Thank you kindly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.