2

I want a datatable with the feature inside the column, with the option to select between two values which is been displayed.

like in the below code

<p-dataTable [value]="assocArray" [paginator]="true" [rows]="10" [globalFilter]="gb" selectionMode="single" [(selection)]="selectedAssociate" 
                        (onRowSelect)="onAssociateRowSelect($event)">
                     <p-column field="assocTypename" header="Associate Format" [sortable]="true">
                        <template let-col="rowData" pTemplate type="body">
                            <span>{{col.assocTypeName}}</span>
                        </template>
                    </p-column>
                    <p-column field="addressee" header="Addressee" [sortable]="true">
                        <template let-col="rowData" pTemplate type="body">
                            <span>{{col.addressee}}</span>
                        </template>
                    </p-column>
                    <p-column field="contactname" header="Contact Name" [sortable]="true">
                        <template let-col="rowData" pTemplate type="body">
                            <span>{{col.contactname}}</span>
                        </template>
                    </p-column>
                     <p-column field="heading" header="Current Heading" [sortable]="true" selectionMode="multiple">
                        <template let-col="rowData" pTemplate type="body">
                            <span>{{col.heading}}</span>
                        </template>
                    </p-column>
                    <p-column field="heading" header="System Generated Heading" [sortable]="true" selectionMode="multiple">
                        <template let-col="rowData" pTemplate type="body">
                            <span>{{col.heading}}</span>
                        </template>
                    </p-column>
                    </p-dataTable>

I want to be able to select the values from either of the two columns Current Heading and System generated heading for that particular row. Could you please let me know if you have an option like that and how to accomplish this?

Tried the column selection mode property but it wouldn't get the actual value for that particular column.

Antikhippe
  • 6,316
  • 2
  • 28
  • 43
S_developer
  • 252
  • 5
  • 18
  • "Tried the column selection mode property but it wouldnt get the actual value for that particular column" - What did it return instead? Could you whip up a plnkr for this? – inoabrian Jan 11 '17 at 13:56

0 Answers0