Giter Site home page Giter Site logo

devexpress-examples / blazor-dxrichedit-place-control-in-edit-form Goto Github PK

View Code? Open in Web Editor NEW
0.0 34.0 0.0 330 KB

Place a Rich Text Editor component inside an Edit Form and bind the component's content to a data field.

License: Other

HTML 77.31% C# 22.69%
binding blazor dxeditors dxrichedit editform

blazor-dxrichedit-place-control-in-edit-form's Introduction

Blazor Rich Text Editor - How to use the component inside an EditForm

You can place various DexExpress Blazor components inside an Edit Form to process/validate user input. In this example, an edit form is bound to a data source and includes the following components:

  • Text boxes
    The Name, Address, and Phone text boxes are bound to corresponding data fields.

  • Rich Text Editor
    Displays the document whose path is specified in the Notes field.

  • Buttons
    The Next and Previous buttons allow users to navigate data records. The Save button saves changes to the bound data source.

Blazor DxRichEdit bind component to a document

Overview

You can place our Blazor Rich Text Editor component inside an Edit Form. To bind component content to a data field, use one of the following methods:

The field contains a path to a document

Follow the steps below:

  1. Assign the document's format to the DocumentFormat property.
  2. To open this document in our Blazor Rich Text Editor, assign the document's content as a byte array to the DocumentContent property. In this example, the component updates its content when a user clicks the Next or Previous button (when switching between data records).
  3. Write the DocumentContent property value back to the document to save changes.

If the Rich Text Editor does not support a given document's format, use third-party server libraries (such as the DevExpress Office File API) to convert the document from its original format to a supported format (and vice versa).

The field contains a document

Our Blazor Rich Text Editor allows you to bind its content directly to a field that stores the document (assuming the document is in a supported format). To proceed with this implementation, follow the steps below:

  1. Assign the document's format to the DocumentFormat property.
  2. Bind the DocumentContent property to the field.

The control updates bound field values each time the DocumentContentChanged event occurs. Call the SaveDocumentAsync method to raise this event on-demand.

Files to Look At

Documentation

More Examples

blazor-dxrichedit-place-control-in-edit-form's People

Contributors

svetlanamikheeva 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

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.