primeng-datatable

How to preset (programmatically) the filter value in primeng datatable

懵懂的女人 提交于 2019-12-06 12:05:28
问题 Using angular (4.1.3) and primeng (4.0.3) datatable I need to set the filter value (e.g. from URL parameter). There is a pretty good docu on custom filters by primeng (https://www.primefaces.org/primeng/#/datatable/filter). I've tried to implement it similarly with a primeng InputText component as a custom filter: <p-dataTable [value]="licenses" scrollable="true" exportFilename="licenses" sscrollHeight="60vh" [paginator]="true" [rows]="20" [pageLinks]="10" [rowsPerPageOptions]="[5,10,20,50

How update row background colour when row updated in ng-prime datatable for dynamic columns?

混江龙づ霸主 提交于 2019-12-06 04:34:33
I want to change row colour when row updated.how set row background colour when record is updated successfully . .html <p-dataTable emptyMessage="{{tbldatamsg}}" [value]="dataset" scrollable="true" [style]="{'overflow':'hidden!important'}" [responsive]="true" [stacked]="stacked" [filters]="GlobalFilterValue" [rows]="20" sortMode="multiple" [(selection)]="selectedRow" selectionMode="multiple" [resizableColumns]="true" columnResizeMode="expand" [paginator]="true" [globalFilter]="gb" [rowsPerPageOptions]="[10,15,20,25]" appendTo="body" #dt> <p-column styleClass="checkbox ui-resizable-column"

How to preset (programmatically) the filter value in primeng datatable

淺唱寂寞╮ 提交于 2019-12-04 17:29:55
Using angular (4.1.3) and primeng (4.0.3) datatable I need to set the filter value (e.g. from URL parameter). There is a pretty good docu on custom filters by primeng ( https://www.primefaces.org/primeng/#/datatable/filter ). I've tried to implement it similarly with a primeng InputText component as a custom filter: <p-dataTable [value]="licenses" scrollable="true" exportFilename="licenses" sscrollHeight="60vh" [paginator]="true" [rows]="20" [pageLinks]="10" [rowsPerPageOptions]="[5,10,20,50,100,999999]" #dt> <p-column [style]="{'width':'180px'}" [sortable]="true" field="customerId" header=

PrimeNG DataTable server-side paging

£可爱£侵袭症+ 提交于 2019-12-04 11:01:28
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! Looks like Lazy is what we are... looking for :) https://www.primefaces.org/primeng/#/table/lazy Jyoti With the help of Lazy Loading, we can implement server side paging,

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

扶醉桌前 提交于 2019-12-03 18:59:47
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. 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': 'capitalize','width':'100%'}" class="button btn-xs" [label]="filterRow.label"></button> </label> </div> <!--

how set primeng data table columns auto fit?

丶灬走出姿态 提交于 2019-11-30 18:10:36
问题 I have want to make prime ng data table columns set auto fit as well as re sizeable.So I have solved this issue changed in two css class .ui-datatable table and .ui-datatable-tablewrapper. 回答1: I have used following code. Changed in SCSS set table-layout:auto !important; .html <p-dataTable [value]="Dataset" [style]="{'width':'100%','overflow':'auto!important'}" [responsive]="true" [rows]="20" [resizableColumns]="true" columnResizeMode="expand" [immutable]=false [paginator]="true"