Open Closed

Issue with the datatable component #10296


User avatar
0
MartinD created

Hi ABP,

As the ngx-datatable is included in the theme and we use it project wide, we would like to implement a row detail as shown here - https://swimlane.github.io/ngx-datatable/#/row-details. Could you point us to the right approach for accomplishing this, because we are facing some difficulties?

Thanks in advance!


2 Answer(s)
  • User Avatar
    0
    fahrigedik created
    Support Team Angular Expert

    Hi @MartinD

    Thank you for your feedback regarding row details functionality in data tables.

    Option 1: Using ngx-datatable Directly

    Since ABP uses ngx-datatable under the hood, you can use its row-detail feature directly by replacing <abp-extensible-table> with <ngx-datatable>:

    import { NgxDatatableModule } from '@swimlane/ngx-datatable';
    
    @Component({
      imports: [NgxDatatableModule],
      template: `
        &lt;ngx-datatable #table [rows]=&quot;data.items&quot; [count]=&quot;data.totalCount&quot; [list]=&quot;list&quot;&gt;
          &lt;ngx-datatable-row-detail [rowHeight]=&quot;&#39;100%&#39;&quot;&gt;
            &lt;ng-template let-row=&quot;row&quot; ngx-datatable-row-detail-template&gt;
              &lt;div class=&quot;p-3&quot;&gt;{{ row.name }} - Details here&lt;/div&gt;
            &lt;/ng-template&gt;
          &lt;/ngx-datatable-row-detail&gt;
          
          &lt;!-- Expand/Collapse Column --&gt;
          &lt;ngx-datatable-column [width]=&quot;50&quot; [sortable]=&quot;false&quot;&gt;
            &lt;ng-template let-row=&quot;row&quot; let-expanded=&quot;expanded&quot; ngx-datatable-cell-template&gt;
              &lt;a href=&quot;javascript:void(0)&quot; (click)=&quot;table.rowDetail.toggleExpandRow(row)&quot;&gt;
                &lt;i class=&quot;fa&quot; [class.fa-chevron-down]=&quot;!expanded&quot; [class.fa-chevron-up]=&quot;expanded&quot;&gt;&lt;/i&gt;
              &lt;/a&gt;
            &lt;/ng-template&gt;
          &lt;/ngx-datatable-column&gt;
          
          &lt;!-- Your other columns --&gt;
        &lt;/ngx-datatable&gt;
      `
    })
    export class MyComponent { }
    

    📚 ngx-datatable Documentation: https://swimlane.gitbook.io/ngx-datatable/api/row-detail

    Option 2: Using <abp-extensible-table-row-detail> (New Feature)

    We have implemented row-detail support directly in <abp-extensible-table> You can now use the new child component:

    <abp-extensible-table [data]="data.items" [list]="list">
      <abp-extensible-table-row-detail>
        <ng-template let-row="row">
          <div class="p-3">{{ row.name }} - Details here</div>
        </ng-template>
      </abp-extensible-table-row-detail>
    </abp-extensible-table>
    

    This approach preserves ABP's extensibility features (entity props, actions, etc.) while adding row-detail functionality.

    📌 Track this feature: https://github.com/abpframework/abp/issues/24635

    Best regards, ABP Team

  • User Avatar
    0
    MartinD created

    Thanks!

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 09, 2026, 07:22
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.