Code Monkey home page Code Monkey logo

bindinglistview's People

Contributors

dimaaan avatar waynebloss 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

Watchers

 avatar  avatar  avatar  avatar  avatar

bindinglistview's Issues

ambiguous match found exception in bindinglistview

https://stackoverflow.com/questions/32313458/ambiguous-match-found-exception-in-bindinglistview

question from link:

I keep getting this exception while using Andrew Davey's BindingListView (http://blw.sourceforge.net/). I am using ServiceStack OrmLite . My objects looks like this:

public class Category
{
    public int Id { get; set; }
    public string Name { get; set; }
}

public class Product
{
    public int Id { get; set; }
    public int CategoryId { get; set; }
    public int ProductTypeId { get; set; }
    public string Name { get; set; }

    [Reference] 
    public Category Category { get; set; }
}

I have no idea how to pass this exception.


i think this is happening because

product.Name
product.Category.Name

product.Id
product.Category.Id

when that lib does reflection to get Property, it gets 2 "Name".

code doesnt know, Which one do you want. Product.Name from or Product.Category.Name.

my proposed solution is blw shoud ignore properties if it is customClass (Category which is inside of Product)

public class Product
{
    public int Id { get; set; }
    public int CategoryId { get; set; }
    public int ProductTypeId { get; set; }
    public string Name { get; set; }

     /*       blw should not read the properties of this customClasses      */
    public Category Category { get; set; }
}

Support for filter from string expression

I'm attempting to use BindingListView with DataGridViewAutoFilter, but it seems that it uses string expression filters, therefore whenever I try AutoFilter, it throws an exception which appears to come from your code:

        string IBindingListView.Filter
        {
            get
            {
                return Filter.ToString();
            }
            set
            {
                throw new NotSupportedException("Cannot set filter from string expression.");
                //TODO: Re-instate this line once we have an expression filter
                //Filter = new ExpressionItemFilter<T>(value);
            }
}

Dynamic comparison functions under .NET 5.0

It looks like the dynamic code generation for comparison generates an invalid IL code. I tried this for the Foo example for sorting on the Abscissa. The function private static Comparison<T> BuildValueTypeComparison( PropertyInfo pi, ListSortDirection direction ) returns in invalid IL code.

Issue when property value is null

Hello,

I have a column which binds to images stored as byte[]. When one row contains NULL in this property, an exception is thrown from AggregateBindingListView.cs, method CreateProvidedView().
The cause is that Activator.CreateInstance(viewType, list) doesn't know which constructor to take, given that list is null.

Please provide a fix for this case.

Thanks,
Cantemir

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.