logo Enterprise-level component library based on Bootstrap and Blazor
gitee
oscs
version
license
download
repo
commit
build
coverage

Table

Commonly used in single table maintenance, simple addition, deletion, modification, search, sorting, filtering, search and other common functions can be realized through attribute configuration, and very complex business requirements can be realized through advanced usage of Template

Set Items as the data source, without setting OnSaveAsync OnDeleteAsync callback delegate to use built-in processing logic to update and delete functions

Demo

Setting Items as the data source eliminates the need to set OnSaveAsync OnDeleteAsync callback delegates to use built-in processing logic for updates and deletes

Set ShowSearch to show the query component

Demo

In this example, the right alignment of Count is set, the Complete column is set to center alignment, and the Boolean column is automatically rendered as a Switch component

When the OnAddAsync or OnSaveAsync callback delegate method is set, if the EditTemplate is not set to edit the template, the component will try to automatically generate the form maintenance UI

Demo

Client-side validation can be achieved by setting validation tags such as [Required] of the Foo attribute of the class instance Foo of the generic constraint of TItem

When the data binding type is a nullable type, it is automatically allowed to be null, such as the date binding column is of type DateTime?

When the data binding type is a numerical type, for example, if the quantity binding column is of type int, numerical verification is performed automatically

Some data columns presented in the table are calculated results. This type of column cannot be edited. By setting Editable=false to automatically generate the editing UI, the editing component of this column will not be generated, such as In this example, the Count column does not appear in the edit popup

By setting Readonly=true to automatically generate editing UI, this field will be read-only, please assign the default value to Model when creating a new one

Make the extension buttons appear in front of the row by setting IsExtendButtonsInRowHeader=true

Make the edit popup draggable by setting EditDialogDraggable='true'

When the EditTemplate of the column is set, the component automatically generates the form maintenance UI using this template as the rendered UI

Demo

Use the drop-down box to select the name when custom editing by setting the EditTemplate of the name column
In this example, Name is listed as a custom component TableNameDrop, which defaults to please select ... when creating a new one

By setting the EditMode property of the table, set the component to edit the row data in the pop-up window or edit the data in the row

Demo

EditMode is an enumeration type and its values ​​are: Popup EditForm InCell Its default value is Popup pop-up window to edit row data

In this example, the data source Items is set as two-way binding, which is especially suitable for parent-child table entry. You can directly use the data source when saving.

EditForm Pattern example

InCell Pattern example

When the data operation callback method is not provided, the component automatically finds the registered data service to add, delete, modify and check the data.

Demo

The database operations of adding, deleting, modifying and checking are performed by registering the data service without assigning the following callback delegates. The priority level is that the callback method is called first if there is a callback method.

  • OnAddAsync
  • OnDeleteAsync
  • OnSaveAsync
  • OnQueryAsync
Startup file injects data service Implementation principle and usage introduction
custom data service
After enabling the use of the injected data service, you can set the component individually by setting the <code>DataServices</code> parameter, if the instance provided by the internal use of the injected service is not set

services.AddTableDemoDataService();

By setting the DataService attribute of the table, use an independent data service to add, delete, modify and check data

Demo

custom data service

After enabling the use of the injected data service, you can set the component individually by setting the DataServices parameter, if the instance provided by the internal use of the injected service is not set
In this example, by setting the EditDialogShowMaximizeButton parameter, the Maximize button is displayed in the edit pop-up window

services.AddTableDemoDataService();

Set EditFooterTemplate custom button in EditDialog Footer

Demo

Click the Edit button in the table to pop up the Edit pop-up window. The buttons in the pop-up window Footer are user-defined buttons. In order to keep the functions of the original Close and Save buttons while facilitating the second opening, two corresponding components DialogCloseButton DialogSaveButton These two buttons do not need to write the click related processing methods

<EditFooterTemplate Context="model">
    <Button Text="Popup" Color="Color.Danger" Icon="fa-regular fa-comment-dots" OnClick="() => OnClick(model)"></Button>
    <DialogCloseButton />
    <DialogSaveButton Color="Color.Primary" Icon="fa-solid fa-floppy-disk" Text="Save" />
</EditFooterTemplate>

B station related video link

交流群

QQ Group:BootstrapAdmin & Blazor 795206915 675147445 Welcome to join the group discussion
img
Themes
Bootstrap
Motronic
Ant Design (完善中)
DevUI (制作中)
LayUI (完善中)
An error has occurred. This application may no longer respond until reloaded. Reload
Seems like the connection with the server has been lost. It can be due to poor or broken network. Please hang on while we're trying to reconnect...
Oh snap! Failed to reconnect with the server. This is typically caused by a longer network outage, or if the server has been taken down. You can try to reconnect, but if that does not work, you need to reload the page.
Oh man! The server rejected the attempt to reconnect. The only option now is to reload the page, but be prepared that it won't work, since this is typically caused by a failure on the server.
Bootstrap Blazor Component library updated to 7.4.4-beta01

Bootstrap Blazor at present has more than 120 components. This component is based on Bootstrap Blazor An enterprise-level component library that provides several types of common components such as layout, navigation, form, data, notification, icon, voice, etc. Each component has been carefully designed with modularity, responsiveness and excellent performance. Starting from more practical scenarios, meeting the needs of various scenarios, greatly reducing the time cost of developers, greatly shortening the development cycle, greatly improving development efficiency, and providing a set of General Rights Management System Example project。Bootstrap Blazor Products are maintained by a professional full-time technical team, with efficient response speed, diversified solutions, long-term support, and enterprise-level support. At present, it has been used in many well-known state-owned enterprises, and the project is running stably with a maximum of 1200 people online. On the right is the QR code of the Chinese Blazor QQ community with the largest number of people in China, welcome to scan and join the group.

component updated to 6.6.0 Change log [portal] If the component brings you convenience, please help to light up the project Star github gitee

QQGroup
QQ 795206915