简体   繁体   English

在 generi-ui 网格的 Guipaging 块中显示复选框 angular

[英]Display checbox in Guipaging block in generi-ui grid angular

I am using below grid in angular https://generic-ui.com/examples我在 angular https://generic-ui.com/examples中使用下面的网格

Below is screenshot of how it looks in my system.下面是它在我的系统中的外观截图。

In the end you can see one Checkbox with Show All.最后你可以看到一个带有 Show All 的 Checkbox。

I want to display that checkbox under Search option in left side of pagination.我想在分页左侧的“搜索”选项下显示该复选框。

You can see details in screenshot and below is my code.您可以在屏幕截图中看到详细信息,下面是我的代码。 In code you can see html and ts file from where I am displaying paging.在代码中,您可以从我显示分页的位置看到 html 和 ts 文件。 But I don't know how can I get displayed this checkbox in left side of pagination.但我不知道如何在分页左侧显示此复选框。

在此处输入图像描述

html file html 文件

 <gui-grid [source]="source"
      [columns]="columns"
      [maxHeight]="500"
      [loading]="loading"
      [paging]="paging"
      [sorting]="sorting"
      [searching]="searching"
      [titlePanel]="titlePanel"> 
    </gui-grid>

 <mat-checkbox (change)="showAllUsers()">
      Show All
    </mat-checkbox>

ts file:文件:

Getting data in this way:通过这种方式获取数据:

columns: Array<GuiColumn> = [
    {
      header: 'Name',
      field: 'name',
      width: 140
    },
    {
      header: 'Type',
      field: 'type',
      width: 140
    }];

I am getting data from API and setting source to that.我正在从 API 获取数据并将源设置为该数据。

paging I am displaying using this code:我使用此代码显示的分页:

paging: GuiPaging = {
    enabled: true,
    page: 1,
    pageSize: 10,
    pageSizes: [10, 25, 50],
    pagerTop: true,
    pagerBottom: true,
    display: GuiPagingDisplay.ADVANCED
  };

You can try with some CSS just giving some idea below..您可以尝试使用一些 CSS 只是在下面给出一些想法..

You can apply to checkbox.. You need to make it responsive so it works in all devices for you.您可以应用到复选框。您需要使其响应,以便它适用于您的所有设备。

style="position: absolute; margin-top: -166px; margin-left: 24px;" 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM