Coder Social home page Coder Social logo

orc.filterbuilder's Introduction

Orc.FilterBuilder

Name Badge
Chat Join the chat at https://gitter.im/WildGums/Orc.FilterBuilder
Downloads NuGet downloads
Stable version Version
Unstable version Pre-release version

FilterBuilder is WPF component which can help you extract key insights from your data, by adding complex filtering functionalities to your application.

For documentation, please visit the documentation portal

orc.filterbuilder's People

Contributors

alexfdezsauco avatar auz34 avatar averus-a avatar ceo1647 avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dmitry-vf avatar geertvanhorrik avatar github-actions[bot] avatar gitter-badger avatar michu avatar mkhomutov avatar npodbielski avatar sergeyilyin avatar sunnycase avatar tchief 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

Watchers

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

orc.filterbuilder's Issues

Store FilterSchemes.xml in AppData directory

Storing it in Environment.CurrentDirectory is a bad idea because most of the time, the application resides in the Program Files directory where the users have no access to (thus cannot store the files).

The best option here is to store the files using this code (Path.GetApplicationDataDirectory is a Catel feature):

_fileName = Path.Combine(Path.GetApplicationDataDirectory(), "FilterSchemes.xml");

Then this will be the directory:

%AppData%[company][product]\FilterSchemes.xml

Building filter - Numeric values and shift + number inputs

I am using a french AZERTY keyboard layout. We often use shift + numbers to input numbers.

There seem to be an issue with holding down the SHIFT modifier key. Inputs work fine when either:

  • Using numeric pad
  • Using cap lock instead of shift

Could the issue be related to any of the behaviors there ?

<TextBox Text="{Binding DataTypeExpression.Value}">
  <TextBox.Visibility>
    <Binding Path="DataTypeExpression.ValueControlType"
             Converter="{StaticResource ValueControlTypeVisibilityConverter}">
      <Binding.ConverterParameter>
        <x:Array Type="{x:Type expressionsViewModels:ValueControlType}">
          <expressionsViewModels:ValueControlType>Byte</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>SByte</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Short</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>UnsignedShort</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Integer</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>UnsignedInteger</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Long</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>UnsignedLong</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Decimal</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Float</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Double</expressionsViewModels:ValueControlType>
          <expressionsViewModels:ValueControlType>Numeric</expressionsViewModels:ValueControlType>
        </x:Array>
      </Binding.ConverterParameter>
    </Binding>
  </TextBox.Visibility>
  <i:Interaction.Behaviors>
    <catel:NumericTextBox IsDecimalAllowed="{Binding DataTypeExpression.IsDecimal}"
                          IsNegativeAllowed="{Binding DataTypeExpression.IsSigned}"
                          UpdateBindingOnTextChanged="False" />
    <catel:UpdateBindingOnTextChanged UpdateDelay="500" />
  </i:Interaction.Behaviors>
</TextBox>

Feature Request: Ability to use the control without the Window

It would be great to be able to use the filter control without the need for a window like below.

preview

The idea is to have the ability to have a layout like the window image below but directly in your user control. The image below is using another 3rd party control (ignore styling) which has this ability built in

captureidea

Error on saving a filterscheme containing an enum

Hi WildGums-Team,

thank you for this useful component. I'm getting an exception The '`' character, hexadecimal value 0x60, cannot be included in a name. when I try to save/serialize a filterscheme that contains a rule based on an enum value.
My example rule ToString is Movement is equal to 'B1' with the enum definition

public enum Movement : byte
{
    B1 = 0,
    B2 = 1
}

The exception gets thrown by calling Catel.Runtime.Serialization.Xml.XmlSerializer.Serialize(path, memoryStream) or FilterSerializationService.SaveFiltersAsync(path).

I've found this issue Catel/Catel#1073 of Catel.Core v4. Maybe they are related.

Also an existing xml-file gets overwritten/deleted, if the serialization fails. Please can you change this behaviour, that the file gets only overwritten, when the serialization succeeds?

Platform: Win 10
.NET version: 4.6.1 and Core 3
FilterBuilder 3.1.1, Catel.Core 5.10.0 and 5.11.2

Installed via NuGet -> file could not be loaded

Window cannot be displayed.

Steps to reproduce

  1. Install via NuGet (v1.6.0)
  2. Reference assembly: xmlns:views="clr-namespace:Orc.FilterBuilder.Views;assembly=Orc.FilterBuilder"
  3. Use Control: <views:FilterBuilderControl RawCollection="{Binding RawItems}" FilteredCollection="{Binding FilteredItems}" />
  4. Start application
  5. On load window XamlParseException

Platform:
.NET version: 4.5

Expected behaviour

Window should load normally.

Actual behaviour

XamlParseException:
Additional information: Could not load file or assembly 'Orc.FilterBuilder, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Update:

The setup I have is, that I have a class library, which pulls the FilterBuilder package. When this class library project is built, due to Copy to Local=true, the .dll gets copied to the output directory. However, in the WPF Project where I reference this class library, FilterBuilder does not appear. Other nuget packages are by default visible e.g. in the ClickOnce publish (application files) window. Strangely FilterBuilder and Catel don't make the list. Both the class library and the WPF project have the same .NET version defined.

Any ideas?

Getting an error on saving a filterscheme containing an enum

Sorry for reopening this issue. I couldn't work lately on the project which uses your lib and my original issue (#169) has been closed by a bot.
Here is my repo https://github.com/half-evil/FilterSchemeTests with some unit tests of my save function.
With your new version 3.3.0 of FilterBuilder all tests fail with this error:

System.Runtime.Serialization.SerializationException : Type 'Orc.FilterBuilder.ConditionGroup' with data contract name 'ConditionGroup:http://schemas.datacontract.org/2004/07/Orc.FilterBuilder' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.

I hope that i'm using your lib the right way.
Thank you for your help.

Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)

  • WPF
  • UWP
  • iOS
  • Android
  • .NET Standard
  • .NET Core

Component

FilterSchemes
XmlSerializer

Version of Library

Catel.Core 5.12.5
Orc.FilterBuilder 3.3
Orc.Metadata 3.2
System.ComponentModel.Annotations 4.7

Version of OS(s) listed above with issue

Win 10

Steps to Reproduce

Expected Behavior

Actual Behavior

Your .dependabot/config.yml contained invalid details

Dependabot encountered the following error when parsing your .dependabot/config.yml:

The property '#/update_configs/0/automerged_updates/0' of type object did not match one or more of the required schemas
The property '#/update_configs/0/automerged_updates/1' of type object did not match one or more of the required schemas
The property '#/update_configs/0/automerged_updates/2' of type object did not match one or more of the required schemas
The property '#/update_configs/0/automerged_updates/3' of type object did not match one or more of the required schemas

Please update the config file to conform with Dependabot's specification.

You can mention @dependabot in the comments below to contact the Dependabot team.

Add support for FastObservableCollection

The FastObservableCollection (part of Catel) only updates after all the items have been added. This prevents the filter from update on the Clear + add item 1 + add item 2 + etc. This way we will only get a single event at the end of the filter apply so we don't have to redraw the UI too many times.

Parameterized display and model annotation

Now that there is an option to convert filters to Linq Expressions, it makes sense to use them with ORM frameworks to run parameterized database queries. It was of course the motivation behind my PR.

Although, these aspects may be lacking :

  • All operators available in Orc.FilterBuilder may not be implemented in the ORM/backing store engine.
  • Some models may not have all their public properties implemented in the table, or simply shouldn't be filtered on these columns.
  • Some properties may require to be displayed in a specific way (enums, int values, ...)

I will probably be working on addressing these issues soon. My questions are :

  • Is this of any interest to you ?
  • Is there any item I missed and you believe I should also tackle ?
  • Do you have any tip or bits I could use before I begin ?

As the title suggests, I am leaning toward using annotations.
Possibly reusing some existing ones -- if compatible with PCL -- such as Browsable, etc. Although, this may restrict possibilities, and as such may not be such a good idea.

Combobox does not restore correctly

I have a filter selected. When the view is unloaded and loaded, it defaults back to the first one in the list. But it has another filter selected. It should restore the right filter in the combobox.

Better example and usage info would be nice

Hello,

I've been trying to get this working for a while, without success. I downloaded and built the dev repo, ran Example and the ribbon-based solution is working well.
But when I tried to include it as the readme/tutorial said, I only got a Button with caption "Default". I saw that @maciz84 and @GeertvanHorrik been talking about the same use case I might need (however, my aim is to provide a standalone filter control for my WPF app).

Could you please:

  1. provide a really basic example of this control opening in a window/above a dataGrid?
  2. add clarification to readme, because for me it's quite obvious that instead of "Import namespace, add control and done" method, I must provide lots of code-behind to be able to use this otherwise fantastic control.

I tried with VS2013 and 2015 as well, through nuGet and also building the project locally and including the built dll. Also tried using "WPF with catel" template, no success either way.

Thanks in advance

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.