primeng-datatable

PrimeNG set the page for the first using lazy loading table

谁都会走 提交于 2019-12-24 11:35:53
问题 I'm using component p-table with "Paginator" and "Lazy loading", and I made one search component with what I need. I am trying to fix the problem when I filter and the page index is on another page. example: page index = 2 Filtering text = texto. Then, I update the records on table and the quantity of pages. But the page index continues with 2, if the result has more or equal quantity of index pages. I've try changing the value from Event but it does not apply. Documentation PrimeNG lazy

PrimeNG DataTable server-side paging

强颜欢笑 提交于 2019-12-21 19:51:30
问题 I'm currently working on an Angular 4 project and using the PrimeNG DataTable. So far this framework seems pretty neat, but I would like to make my paging server-side. That way I will load only 10,20,.. records at a time rather than loading all 1000+ at once.. Has anyone done this before or does anyone know a solution for this? PS: If you don't have a solution but know a framework that does support this, please let me know! 回答1: Looks like Lazy is what we are... looking for :) https://www

primeng p-table exportCSV() function not working?

[亡魂溺海] 提交于 2019-12-13 20:33:09
问题 I am using new PrimengV7 p-table I want export the table, So my code is <p-header> <div class="pull-right" *ngIf="collapsed"> <a href="javascript:void(0)" (click)="dt.exportCSV()" class="icon-export" title="Export"></a> </div> </p-header> <p-table class="ui-datatable" #dt [value]="rmanReconSosrcToBkingsRepList" selectionMode="single" [(selection)]="selectedEmployees" (onRowSelect)="onRowSelect($event)" (onLazyLoad)="getRmanReconSosrcToBkingsRep($event)" [lazy]="true" [paginator]="true" [rows]

primeng 5.0.2 doesn't work with Angular 4?

岁酱吖の 提交于 2019-12-13 03:04:26
问题 I'm developing an angular application, and when I tried to install the latest version of primeng , I'm getting version mismatch error as shown below , I want to use the latest version primeng 5.0.2 for its upgraded features in my Angular 4 project , won't this work ? 回答1: No it won't work because of AOT constraints . From PrimeNG blog : Angular 5 Support PrimeNG 5 fully support Angular 5, if your project is on Angular 4, the PrimeNG version to use would be 4.x as PrimeNG 5 does not work on

PrimeNG table validation

家住魔仙堡 提交于 2019-12-13 00:49:40
问题 I've following PrimeNG Table Here is the StackBlitz demo. https://stackblitz.com/edit/datatablevalidation Only one column "Value" is editable. In "Value" column, I want to add some validation based on the column "Type". I am rendering column value type dynamically <input pInputText [(ngModel)]="rowData[col.field]" type={{rowData.propValueType.toLowerCase()}} class="form-control" /> My biggest challenge is validating the table on the first load because column Type is a new column feature of

DataTable Edit Can not validate with two-dimensional

白昼怎懂夜的黑 提交于 2019-12-11 09:50:04
问题 I face an issue about Datatable Editor My table is data table of PrimeNG, this table can edit any cell of the row and all cell is required: here is the requirement of Datatable: can edit any cell validate any cell (required) when I finished 2 requirements, the input raise up a bug when the input is blank Error: If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as 'standalone' in ngModelOptions. Example 1: <input [(ngModel)]="person

Unable to use primeng <p-datatable> virtual scroll lazy load

。_饼干妹妹 提交于 2019-12-11 07:06:00
问题 I am trying to implement a lazy load for a large set of data with primeng <p-datatable> . I have done everything documented on the official site, however I could not make it work. The onLazyLoad callback runs only once at the time of loading the table. It doesn't trigger on each scroll as expected. <div style="max-height:300px; border:1px solid black;overflow-y:auto"> <p-dataTable #pocListref [value]="data" rowHover="true" [(selection)] = "selectedData" scrollable="true" scrollHeight="200px"

How to highlight a PrimeNG datatable row on click of an image in the column?

[亡魂溺海] 提交于 2019-12-11 04:32:19
问题 I have PrimeNG datatable with 10 columns. Last column contains images. On click of the image I have to highlight the row. If I add selection mode 'single' in the datatable, on click of row it highlights the row. I do not want that. I want it to be highlighted only when the user clicks on the image at the last column. <p-column> <ng-template let-row="rowData" pTemplate type="body"> <img src="assets/images/info_icon.jpg" style="height:20px;width:20px"> </ng-template> <p-column> 回答1: What you

Primeng DataTable Dropdown doesn't work with options via column

♀尐吖头ヾ 提交于 2019-12-10 11:32:22
问题 I'm making a re-usable table component for my application based on DataTable from PrimeNG. My component has the following html code: <p-dataTable [value]="cars" [rows]="5" [paginator]="true" [globalFilter]="gb" [(selection)]="selectedValue" (onRowSelect)="onRowSelect($event)" #dt> <p-column *ngIf="hasSelectCheckbox" [style]="{'width':'38px'}" selectionMode="single"></p-column> <p-column *ngIf="hasExpander" expander="true" styleClass="col-icon"></p-column> <p-column *ngFor="let col of cols"

prime-ng create custom filter for column filed set outside of data table in angular 4

强颜欢笑 提交于 2019-12-09 13:42:31
问题 when I have clicked on button then data table particular column set the filter value.when I have clicked on CARG button then apply that value on the symbol column. when clear the value its show all records. 回答1: Solved.. using dt.filter(value,field, matchMode); .html <div class="ui-widget-header nopadding"> <label *ngFor="let filterRow of Symbols_Array;let l=index;"> <button (click)="dt.reset(); ColumnFilter(dt,filterRow.label,'symbol','')" pButton type="button" [style]="{'text-transform':