Code Monkey home page Code Monkey logo

fancygrid's Introduction

,------. ,----. ,--. ,--.
| .---',--,--.,--,--, ,---.,--. ,--.' .-./ ,--.--.--' ,-| | | --,' ,-. || | .--' \ ' / | | .---.| .--',--.' .-. |
| | \ '-' || || |\--. \ ' ' '--' || | | |\ -' | --' ----'--''--' ---'.-' / ------' --' --' ---'
`---'

#####################################

Putting this control in your view

#####################################

Add BD.UI.WPF as a reference. Add xmlns:bdwpf="clr-namespace:BD.UI.WPF;assembly=BD.UI.WPF" to your XAML namespaces. Add

`<bdwpf:FilteringDataGrid ItemsSource="{Binding SomeCollection}" />`

where you want your fancygrid to go.

It will be bound to the SomeCollection property on your view model with pure microsoft magic.

##############################################

If your grid looks just like a normal grid

##############################################

Add <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/BD.UI.WPF;component/Themes/Generic.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> To your <Application.Resources> in your App.xaml

I'm working on making it so you don't have to do this.

#####################################

To hide columns or rename headers

##################################### ` [DisplayName("A Lovely Foo")] public int Foo {get;set;} // Will show in grid as A Lovely Foo

public int Bar {get;set;} // Will show in grid as Bar

[Browseable(false)] public string Fizz {get;set;} // Won't Show in grid. You can also use all the attributes inSystem.ComponentModel`

#############################################################################

To access items that are currently in the filter, and in the sorted order

#############################################################################

Just grab the Items property

#########################################

To access all items in original order

#########################################

Grab the ItemsSource Property. If ItemsSource is null, try DataContext.

###############################################

Control Created by [email protected]

###############################################

fancygrid's People

Contributors

hur1can3 avatar owen2 avatar

Stargazers

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

Watchers

 avatar  avatar

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.