Giter Site home page Giter Site logo

devexpress-examples / blazor-default-settings Goto Github PK

View Code? Open in Web Editor NEW
0.0 55.0 1.0 640 KB

Inherit from DevExpress Blazor components. Override the SetParametersAsync and SetParametersAsyncCore methods and specify custom default values for all components of the same kind.

License: Other

HTML 70.54% C# 29.46%
blazor components devexpress inheritance

blazor-default-settings's Introduction

DevExpress Blazor Components - Set predefined settings for a specific component

Controls generally have the same settings across different pages within a large web application. We recommend that you specify these component settings in markup. You can also override the SetParametersAsyncCore (for the Grid and Editors) or the SetParametersAsync (for other components) method to specify default settings for Blazor components used within in your application.

Grid with predefined settings and default

Create an inheritor from our Blazor control to override the SetParametersAsync or SetParametersAsyncCore method. You can set the default initial values for the public properties in either the SetParametersAsync or SetParametersAsyncCore method before you call the base SetParametersXXX method. In markup, you can initialize properties with modified default values since the base method is called after custom settings are applied.

Note: You should not override and change the values of protected properties. Such changes may generate unexpected outcomes.

In this example, the MyGrid component contains an inherited DxGrid component whose PageSize, ShowFilterRow, AllowSort, and ShowGroupPanel properties contain new default values. You can compare the MyGrid component to the original DxGrid component on the Index page to ensure they have the same settings in markup.

You cannot use this technique for DxChartXXXSeries components and specify the ValueField, ArgumentField, NameField, and PaneField properties.

Files to Review

blazor-default-settings's People

Contributors

khamlyuk avatar outsidergiant avatar svetlanamikheeva avatar zabelin-vladimir avatar

Watchers

 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

Forkers

khamlyuk

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.