Compoments can be embedded on a grid. These components can be started pushing a button on the top of the grid and will be shown on the screen.
You can use the AddButtonComponent method of the GridClient object to add a component:
var client = new GridClient<Order>(q => orderService.GetOrdersGridRows(columns, q), query, false, "ordersGrid", Columns, locale)
.AddButtonComponent<EmployeeComponent>("Employees", "Employee's Grid");
AddButtonComponent method has 3 optional parameters:
Parameter | Type | Description |
---|---|---|
Actions | IList<Action> (optional) | the parent component can pass a list of Actions to be used by the component |
Functions | IList<Func<object,Task>> (optional) | the parent component can pass a list of Functions to be used by the child component |
Object | object (optional) | the parent component can pass an object to be used by the component |
If you use any of these paramenters, you must use them when creating the component.
You must also create a Blazor component that allows 4 optional parameters:
Parameter | Type | Description |
---|---|---|
Grid | CGrid (optional) | Grid can be used to get any required information |
Actions | IList<Action> (optional) | the parent component can pass a list of Actions to be used by the component |
Functions | IList<Func<object,Task>> (optional) | the parent component can pass a list of Functions to be used by the child component |
Object | object (optional) | the parent component can pass an object to be used by the component |
Actions, Functions and Object must be used when calling the AddButtonComponent method, but Grid can be used without this requirement.
The component can include any html elements as well as any event handling features.
This is an example of a grid with 2 additional components:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。