Data Table - Check box in Row Group Header

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
gopalakrishnach
Posts: 18
Joined: 19 Apr 2017, 23:28

24 Apr 2017, 22:59

I am able to add checkbox in my row group header in my data table.
When I click the checkbox in row group header all the checks for that row group must be checked. I am trying this but getting error. ERROR TypeError: Cannot read property 'concat' of undefined. Please help me.

<p-dataTable [value]="apprestrictions" selectionMode="multiple" [(selection)]="selectedApprestrictions" sortField="belongsTo" rowGroupMode="subheader" groupField="belongsTo" expandableRowGroups="false" [responsive]="true" [loading]="loading">
<!--<p-header>Subheader</p-header>-->
<ng-template pTemplate="rowgroupheader" let-rowData>
{{rowData['belongsTo']}}
<p-checkbox name="groupname" (onChange)="onaccountselected(checked)"></p-checkbox>
</ng-template>
<p-column selectionMode="multiple" header="Select"></p-column>
<p-column field="id" header="ID"></p-column>
<p-column field="name" header="Name"></p-column>
<p-column field="displayBelongsTo" header="Belongs To" [sortable]="true"></p-column>
</p-dataTable>

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

25 Apr 2017, 10:25

Hi,

We will review this and get back to you.

gopalakrishnach
Posts: 18
Joined: 19 Apr 2017, 23:28

25 Apr 2017, 16:43

Thank you very much. I will be waiting for some help.

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

27 Apr 2017, 10:01

We discussed this and it is not supported actually.

gopalakrishnach
Posts: 18
Joined: 19 Apr 2017, 23:28

27 Apr 2017, 17:36

I solved the issue. I simply added items to my array property which I binded to selection property in my datatable. Thats all.

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

28 Apr 2017, 20:41

Glad to hear that.

gopalakrishnach
Posts: 18
Joined: 19 Apr 2017, 23:28

28 Apr 2017, 20:44

I am having another issue. In my Row group header when I use p-checkbox I am getting an error message when I click on check box so I replaced that with input type=checkbox.

Can you please let me know how I can sync the checkboxes on row group headers with data table header checkbox( which is used to select all rows )

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

05 May 2017, 14:10

Hi,

This issue is not related to the layout itself if you create a new topic to;

viewforum.php?f=35

It can be more helpfull.

Regards

gopalakrishnach
Posts: 18
Joined: 19 Apr 2017, 23:28

05 May 2017, 16:50

Thanks. I will do.

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests