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

Table Column

Used to display multiple pieces of data with similar structures, data can be sorted, filtered, compared or other custom operations.

Add column header display name by setting Text

Demo

The fields in the table component TableColumns template are automatically displayed according to the DisplayName tag value of the bound model. If you want to customize the display name, please set Text property

Loading...

Add the first column of the table by setting IsMultipleSelect="true" to select the column, and the ShowRowCheckboxCallback callback delegate can control whether each row displays the checkbox. In this example, the Complete attribute to control whether to display the checkbox

Demo
Loading...

By setting ShowCheckboxText=true the display text in the first column of the table is select

Demo
Loading...

RowTemplate internal component TableCell set Checkbox and set related data binding. In this example, data binding will select The box component is bound to the value

Demo
Loading...

By setting the TableColumn Width property, the column width is controlled, and the inline button operation column width is controlled by the ExtendButtonColumnWidth property

Demo

Continue the previous example in this example, implement four custom function buttons, and extend them to the row. When each button is clicked, there is a corresponding callback delegate method. TableToolbarButton uses It is the way of Delegate to complete the data exchange. When the toolbar button is clicked, set the OnClick delegate method to obtain the selected row data set in the table

Continue the previous example in this example, implement four custom function buttons, and extend them to the row. When each button is clicked, there is a corresponding callback delegate method. TableToolbarButton uses It is the way of Delegate to complete the data exchange. When the toolbar button is clicked, set the OnClick delegate method to obtain the selected row data set in the table

Control whether the button is displayed by setting the button IsShow parameter

Loading...

Customize the Template template of the TableColumn column to implement any UI

Demo

In this example, the column DateTime value is displayed in different colors depending on whether the Complete value is true

In this example, the column Complete is displayed as a Checkbox component according to the value of Complete

Template template comes with Context associated context, its value is of type TableColumnContext

  • Value is the data value of the currently bound column
  • Row is the data value of the row where the currently bound column is located
Loading...

Format the cell value by specifying the FormatString or Formatter callback delegate when the column is bound

Demo

In this example the column DateTime values ​​are formatted according to FormatString to yyyy-MM-dd year month day format

In this example the column Count value is formatted according to Formatter to 0.00 with two decimal places

Loading...

Set the alignment by specifying the Align attribute when the column is bound

Demo

In this example the column DateTime is set to center alignment Alignment.Center

In this example the column Count is set to right-align Alignment.Right

Loading...

Set whether to display at different widths by specifying the ShownWithBreakPoint attribute

Demo

ShownWithBreakPoint enumeration value:

  • None is displayed if not set
  • Small is displayed when the screen is greater than or equal to 576px
  • Medium is displayed when the screen is greater than or equal to 768px
  • Large is displayed when the screen is greater than or equal to 992px
  • ExtraLarge is displayed when the screen is greater than or equal to 1200px

In this example, the Count column is set to BreakPoint.Large, that is, the screen will only be displayed when it is larger than 992px

Note:

Because the Table component supports mobile adaptation by default, the card mode is used for small screens. In this example, the explicit setting uses RenderMode="TableRenderMode. Table" mode

Loading...

Set whether the column is displayed by specifying the ShowColumnList attribute

Demo

ShowColumnList The default value is false, and if it is explicitly specified as true, the corresponding column adjustment button will appear in the toolbar

TableColumn adds the Visiable property, its default value is true, this column will not be displayed when the display is set to false

In this example, the quantity column is not displayed by setting Visible, and it can be displayed through the column control button

Trigger the OnColumnVisibleChanged callback when switch the column state Show/Hide

Call the instancel method ResetVisibleColumns of Table for set the multiple columns visible value

Loading...

Set table columns to allow resizing by specifying AllowResizing

Demo

Column resizing can only be done when the screen is too small and the scroll bar appears

Loading...

Set ShowCopyColumn show the icon for copy entire column data

Demo

可以通过设置 ShowCopyColumnTooltip CopyColumnTooltipText CopyColumnCopiedTooltipText 等设置微调拷贝列数据图标的 Tooltip 相关参数

Loading...

By specifying Template set the last column to display as a custom button

Demo
Loading...

By specifying the AutoGenerateColumns property value as true, enable the function of automatically generating column information based on the binding model

Demo

In this example, by setting the value of AutoGenerateColumns to true, the automatic column generation function is enabled. All attributes of the bound model entity class are all generated by default. code>AutoGenerateColumnAttribute tag class for function settings, such as:

  • Ignore means ignore this property, i.e. not generate
  • Readonly means read only
  • For more attributes, see Source code
In this example the date column is formatted through the [AutoGenerateColumn(Order = 1, FormatString = "yyyy-MM-dd")] tag; Set the template column in the code to customize the Complete column and use the Switch component to render; through the [AutoGenerateColumn(Order = 10)] tag in the Order set the display order

Loading...

By specifying OnColumnCreating callback, make secondary data changes to the column collection

Demo
Loading...

Custom rendering of columns by showing template Template

Demo
Loading...

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