Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lightning-datatable]

A table that displays columns of data within lightning experience, formatted according to type. This component requires API version 41.0 and later.

0
votes
0answers
22 views

Datatables, push custom components insted of simple text [duplicate]

I'm developing a custom component which should behave similarly to a related list but with some added features. The component should be a list of related object which is modifiable inline. Each row ...
3
votes
1answer
72 views

How do you center align the text of the column headings for a lightning:datatable?

I'm able to apply color or make the column heading text bold, but I can't center align the text for some reason. <lightning:datatable data="{! v.data }" columns="{! v.columns }" ...
0
votes
1answer
44 views

Can we add bold style to last row in Lighitng Data table??

I am using "lightning:datatable" tag to display set of rows in UI. Few columns are numeric data. I needed last row to be summarized values of all the data set. I don't find any standard summary ...
5
votes
1answer
125 views

Static values for `<lightning:datatable>`

I've got a working datatable using the following in my component markup: <lightning:datatable columns="{!v.columns}" data="{!v.configuration.channels}" keyField="channelId"/> Columns is a List ...
0
votes
1answer
45 views

Rendering data from Wrapper Class into Lightning Data table

Hi I'm trying to render data from a wrapper class it's coming up with row but values are empty. Component: <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,...
1
vote
0answers
18 views

Calling a lightning component when user clicks on url type cell in lightning:datatable

I have a lightning:datatable which have a few columns. The first column is of type url. <lightning:datatable columns = {!v.columns}" data="{!v.data}" keyField="Id" ...
0
votes
0answers
21 views

lightning:Datatable not displaying properly

When I tried the lightning:datatable component the display looks different from the documentation Please find the below code what I used <aura:attribute type="Account[]" name="acctList"/> <...
1
vote
1answer
40 views

Datatable inline lookup editing

As showed here we can easily implement an inline editing of a data table. Now I will need to have this editable field to behave like a lookup field and not a normal text field. Is this possible? ...
0
votes
0answers
62 views

Refresh component without reloading the component

I have a custom lightning data table with buttongroups as a column. When I click on one of the buttons of the button groups it updates the backend which works fine as of now, but I dont want it reload ...
0
votes
0answers
18 views

Is there an option to handle lightning:datatable OnRowClick event? [duplicate]

My initial requirement is to provide a user with an ability to select one option from the list of data. The list should display a dynamically built table with different columns (String/Date/Boolean). ...
1
vote
1answer
67 views

Show Save and Cancel buttons always on lightning datatable

I have a situation where I need to show Save and Cancel buttons on lightning datatable (inline edit) always. However, unless I edit some field the Save button will not appear. I am displaying the ...
0
votes
2answers
61 views

Is it possible to display 15,000 records in lightning component?

In contact object, we have 15,000 records. I want to display them into a lightning component. Functionality : Need to load 15,000(maybe more) records. Need to provide pagination. Need to Provide ...
1
vote
1answer
62 views

Nested / multi level lighting:datable

I'm looking to see (If it is even possible) to create a multi level lightning datatable. I.E. The parent object has a tickbox in table element 0, If selected a sublevel opens and you can see the ...
3
votes
1answer
50 views

Dynamic Button Icons in a Data Table Similar to Dynamic Actions in a Data Table

It's possible to have actions for each row in a data table that change depending on the contents of the rows (that are changed by those very actions). For example: The component reference provides ...
5
votes
0answers
49 views

How to handle percentage factor of 100 problems when using lightning:input and lightning:datatable?

When working on a bug, I just noticed that lighting:input now supports two percentage formatters, where the older one percent expects the user to know to enter e.g. 0.5 for 50%: <lightning:input ...
0
votes
1answer
265 views

Using wrapper Class in Lightning:Datatable

I am trying to set the data of the Lightning:Datatable from the wrapper class in server-side Controller. public class AccountWrapper{ @AuraEnabled public Account acct {get;set;} ...
0
votes
1answer
226 views

Lightning datatable record shows url of related record

I need to create an activity table like standard look and feel. I got stuck at two point 1.whoid/contact name isn't coming as per need I need to create dummy checkbox field for event Component: &...
0
votes
1answer
431 views

How do we use 'button-icon' column in lightning:datatable?

I'm trying to add button-icon column to my lightning:datatable, but it does not display any icon and simply a blank cell is rendered. I fail to see what I might be doing wrong here. Can someone guide ...
0
votes
1answer
218 views

Hide checkbox column and color some rows of lightning-datatable [duplicate]

I have data of customers and their numbers. I want to show it in dataTable. Additionally, I am trying to color those rows whose numbers are invalid and also disable the checkbox for that row. I have ...
0
votes
0answers
11 views

lightning:datatable - Want a column that looks like an URL but fires onrowaction [duplicate]

Is there any way to add a column to a lightning:datatable that looks like a colum of type "url" but instead of navigation when its click it fires onrowaction so that I can do something (other than ...
1
vote
1answer
355 views

Lightning:datatable number formatting

I have created a lightning:datatable to display order lines. The order lines are fetched via a REST call. I parse the JSON response and add to the datatable data attribute. Everything works fine but ...
2
votes
1answer
93 views

Deleting record associated with a lightning:datatable row - Use LDS or APEX Controller?

What is the recommended method of deleting a record associated with a row in a lightning:datatable? All the examples I see show to make a call to an Apex controller to do the delete (maybe I should ...
1
vote
1answer
127 views

Insert a link in lightning datatable Column Value

I am trying to insert a link in a result column of lightning:datatable Below is the code snippet : Datatable Code: <lightning:datatable data="{! v.contactList }" columns="{...
0
votes
1answer
221 views

Lightning Datatable row selection issue in Pagination

I am using the lightning:datatable component along with the pagination, the issue i am facing is that when we select a specific row/rows and go to next pagination page , then the previous sleccted ...
7
votes
1answer
168 views

How do I get lightning:datatable to do some undocumented thing X?

Canonical Question I want to do <some really cool thing> with a lightning:datatable, but I can't seem to figure out how to do it. I checked the documentation, but I did not see a way to ...
0
votes
1answer
114 views

lightning:datatable set columns dynamicaly

init: function (cmp, event, helper) { var columns = '[{"label": "Rank", "fieldName": "rank", "type": "text","initialWidth": "70"},{"label": "Advocate", "fieldName": "advocateName", "type": "text", "...
1
vote
1answer
240 views

Picklist type inline editing in lightning:dataTable

I have a situation where I need to edit contents of lightning:dataTable and editing should be done from a picklist and not from edit box. I have seen many examples where custom inline Editors are ...
1
vote
1answer
64 views

Url field type is not working in Lightning data table

I have this field definition in a lightning datatable: { "fieldName": "Id", "initialWidth": "150", "label": "Case Number", "sortable": true, "type": "url", "typeAttributes": { "label"...
0
votes
1answer
108 views

I want to access <tr> and <td> element of lightning:datatable in lightning component?

Actually, I want to access TD and TR element in my JS Controller for further processing. " table = document.getElementsById("myTable"); console.log(table);" this line causes an error, if I use a ...
4
votes
0answers
138 views

lightning:dataTable in a multi-currency org

Trying to figure out how to handle records with multiple currency. The dataTable definitions are for the column. I do not see anywhere in the documentation where the currency code of an individual row ...
1
vote
0answers
54 views

lightning:datatable table headers are disappearing in iPad safari browser

I am using lightning:datatable, the table headers are disappearing in iPad safari browser when I try to resize the coloum headers by draging. Please help me in resolving this.
1
vote
3answers
381 views

Conditionally Render Button in lightning:datatable

We are using the (simplified) component/controller below but we want the view button to conditionally render. E.g. When record.boolean__c = true. Is there a way to do this using the lightning:...
1
vote
1answer
307 views

Editable lightning:datatable with Lightning Data Service?

Its it possible to rig up editable lightning:datatable to do saves via lightning data service? In the few samples (very few) saves requests are sent to an APEX controller that you need to write. ...
0
votes
2answers
197 views

lightning:dataTable action column is not rendering properly [duplicate]

I have added a lightning:dataTable within like this <lightning:card title="My Table" iconName="standard:contact"> <p class="slds-p-horizontal_small"> <lightning:...
1
vote
1answer
155 views

How to insert a component into a lightning: datatable component row

I need to create a table and would like to use the ligthingdatatable component. In jqueryDataTable I can put an inline component in the table. But how do I do this for lightning: datatable?
0
votes
1answer
158 views

lightning:datatable action menu error

I'm showing a datatable with a list of opportunities. Now I want to allow for a dropdown menu of actions. When I click on the arrow to the left of the opportunity detail row, it is giving me this ...
1
vote
1answer
343 views

lightning:datatable won't populate with data inside aura:iteration

I have an iteration to set up datatables in slds accordions in my lightning component: <ul class="slds-accordion"> <aura:iteration items="{!v.definitionObjects}" var="objStats"> ...
1
vote
1answer
99 views

$A.get('e.force:refreshView').fire(); for Save funtionality is not working in case of Lightning:dataTable

I want to refresh the view whenever I click on Save button, it should update datatable with newly updated values, but still shows old value. Though update works fine in back-end. Please find code ...
1
vote
1answer
496 views

Update is not working in Inline Editing for Lightning:dataTable

I am trying to update data in inline editing, here I used Lightning:dataTable. As of now, I am not able to capture newly updated data, means the update is not working. Please find the code below: ...
0
votes
1answer
33 views

Static ID works in JS but doesn't work if I take value from Apex Controller?

I want to have pre-selected checkbox for inline editing in Lightning:dataTable tag. So if I am using hard-coded value for ID (i.e. static value) to set value for selectedRows attribute (regarding ...
0
votes
0answers
217 views

Sorting on Reference and Date field in lightning data table

I am displaying task records using lightning datatable in a lightning component. This table contains task records with 2 columns: DueDate (date) and Related To (Account). When the component is loaded ...
1
vote
0answers
181 views

lightning:datatable disable checkbox rows based on if a field has a value [closed]

In lightning:datatable, I'm looking to disable specific rows' checkboxes if one of the other column fields returned in my dataset is not empty. Am I do this without disabling the entire checkbox ...
1
vote
1answer
723 views

Spring 18 <lightning:datatable> Issue with Actions

I am facing an issue with the actions(Show Details, Delete). The Action dropdown is hidden inside the table instead of showing all actions. PFB screenshot. Did anyone face this issue? Below ...
0
votes
1answer
1k views

How to apply css to headers of a lightning:datatable?

I've tried this in two ways: First: component.set("v.columns",[ {label:'', fieldName:'edit', type:'action', class: 'cols', cellAttributes: { iconName: { fieldName: 'utility:custom_apps' }...
0
votes
2answers
656 views

Is there a way to achieve Lightning:dataTable with picklist field?

I want to have inline edit functionality using lightning:dataTable . In my custom object , I have a field called Cabin_Class__c which is a picklist field. When i render this field in the table it is ...
1
vote
1answer
79 views

Is it possible to change the sequence of row action menus of lightning data table from last to first

I just have a requirement where I need to show the edit/delete action menus of row to the first column of lightning:datatable rather than last. I wonder will it be possible since it is pertaining to ...
1
vote
1answer
223 views

Action menus drop down not displayed when using Lightning Datatable

The action menu in my <lightning:datatable is not appearing. Component <aura:component implements="flexipage:availableForAllPageTypes" controller="LightningDataTableController"> <...
9
votes
2answers
760 views

Expand/collapse rows in a datatable

One of the requirements that we have is to make a datatable(or something that looks very similar) with expanding rows. An example would be: Year 199x, I have a video collection of VHS and I want ...
0
votes
2answers
1k views

Help with working with lightning:dataTable?

I've been experimenting with lightning:dataTable and have some issues -- not sure if they're bugs or simply user error. I've spotted lots of issues with setting up the columns. I have a table with 3 ...
2
votes
3answers
3k views

<lightning:datatable> How to set class or icon to data cell?

I'm trying to use lightning:datatable component to render table of my custom data. I do generate myData like: JSONGenerator gen = JSON.createGenerator(true); gen.writeStartArray(); for (all ...