Questions tagged [datatable]

An HTML table that is defined by iterating over a set of data, displaying information about one item of data per row.

Filter by
Sorted by
Tagged with
0 votes
2 answers
48 views

LWC Lightning Data Table - Save All Records(Rows) in the Table upon Save Button Click

I have a requirement to be able to save all records present in the Editable Lightning data table and not just the ones that are edited. Is there a way yo achieve this. I see we can only fetch the drat ...
1 vote
1 answer
32 views

Joining two columns together into a datatable in aura

i have a couple of questions. So, first i have a datatable from a custom obj, where users can add or single email addresses or group of emails (like a mailinglist). There are two columns, one for ...
  • 13
2 votes
1 answer
67 views

Creating Multiple Data Table for list of Records using LWC

Can anyone tell me how do I create multiple data table using single lightning data table in my html and iterating over with template for each with the list ? I am looking at something like this: ...
  • 45
0 votes
0 answers
20 views

What data types do not support inline editing in the Datatable Lightning Web Component?

In the lightning-datatable LWC documentation it is stated that inline editing is available for "some data types". I have reviewed the documentation and can't find which ones do not support ...
  • 125
0 votes
0 answers
25 views

Missing Picklist values in LWC Datatable

The whole component works perfect - only picklist field values are missing. Additionaly after clicking on a pen - the field is moved down. The values are not visible. Do you have any idea what I am ...
-1 votes
0 answers
15 views

How to display column1 row1 when user edited row1 column 4 in custom lwc datatable. When user edit R1 C4 then related R1C1 display on ligtng card

<template if:true = {showTable1}> <lightning-card icon-name="standard:user" style="color:#ff8000;">{currentUserName}</lightning-card> <c-l-w-c-custom-...
2 votes
1 answer
103 views

How can I display response data from apex controller in dataTable?

I want to display data that I'm getting from API response in a datatable. The APEX method returns JSON in this format: { "data": [ [ "765919758146423601", ...
  • 23
1 vote
2 answers
41 views

Sort lightning datatable by default

My sort function works fine, but I the table should be sorted by default. How can I sort the table by date (dateOut) by default? CONTROLLER doInIt : function(component, event, helper) { component....
  • 27
0 votes
0 answers
171 views

Javascript datatable - Row ID's not being picked up after pagnation

I am creating a data table which has an onclick event for 3 columns. When clicking any of the columns on page 1 everything works as expected. If I use the pagination to go to page 2 then the onclick ...
1 vote
0 answers
90 views

How can I display the hierarchy of my custom objects in a Visualforce page using a datatable?

In advance of posting this question, I have attempted to use maps and wrapper classes. I've already made several attempts for the past two months using the suggestions on this forum and the SF ...
1 vote
1 answer
37 views

How to format a number so that dot appears in the thousands?

I have a datatable defined as follows: <lightning:datatable data="{!v.mydata }" columns="{!v.mycolumns}" keyField="id" hideCheckboxColumn="true" ...
  • 25
0 votes
1 answer
186 views

How to delete row in lwc datatable and corresponding object

I have a datable with PermissionSetAssignment objects and I need to delete the record selected from user but when I click delete nothing happens. Here is my code: import { LightningElement, wire, ...
0 votes
0 answers
31 views

If a checkbox is checked then display Primary along with the Name/Title

I am working on a lwc datatable and this is the current position: LWc component is placed in the grant contract object from which a lookup is given to grant object. Here I have the primary contact ...
  • 11
0 votes
2 answers
115 views

Convert checkbox true value to checked symbol

Hi all I am working on a lwc datatable and I have placed a checkbox named Ischecked It currently displays the true/false value in the datatable. Is there some way instead of this true value I can ...
  • 11
0 votes
0 answers
64 views

Print Datatable data LWC

I have a data table in LWC component. I want to print the data of that data table. how can I implement this? I've tried window.print(); but this prints the whole window. anyone knows how can I ...
0 votes
1 answer
492 views

Conditionally disable button in LWC Datatable

I am trying to conditionally disable a button within a LWC Data Table. I have seen similar posts, however none have offered a solution. I am trying to enable or disable the button that displays within ...
  • 31
0 votes
1 answer
972 views

LWC data table not refreshing after save

I have a datatable lwc that displays data returned from an apex method. When I edit the data and hit on save , the data table doesn't refresh automatically and the cell value remains the same although ...
0 votes
1 answer
1k views

LWC Datatable - Add an action button on top left corner

Context : I created my own table that haves a component in the top left corner, that toggles a window with a checkbox group to show or hide some columns. The problem : I now have to port my table into ...
0 votes
1 answer
74 views

Button in datatable is not working with switch case block (lightning component)

Here is my code <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" controller="LC_SearchController" > &...
0 votes
0 answers
476 views

LWC datatable wrap text column header

How can I make the column header in the LWC datatable to be wrapped as well ? wrapText:true only applies for the rows <lightning-datatable key-field="Id" data={...
  • 529
0 votes
0 answers
153 views

conditionally highlighting text in aura lightning datatable

I am trying to conditionally highlight text on an aura datatable with edit access. I cant seem to get the css to conditionally show the highlighted text. At present it is not possible to use a LWC as ...
1 vote
1 answer
98 views

Aura Component Datatable not showing data

*** Component *** <aura:component controller ="VehicleController"> <aura:attribute name="VehicleSelected" type="String"/> <aura:attribute name =&...
  • 21
0 votes
1 answer
796 views

Generate CSV , EXCEL file dynamique with lightning web component

I have a problem with my code , I want to generate a file ( CSV / XLS ) , but with my code I get nothing , I don't now what is the problem . Some help please . <a target="_self" class=&...
0 votes
2 answers
68 views

Customize datatable

everyone! I'm a newbie in Salesforce, and I have a problem: I need to create datatable similar to that: But the only one that I could do is that(I used a standard lightning-datatable, also Usage ...
0 votes
1 answer
515 views

Unable to Get Lightning Datatable Columns in Inline Edit Event

I am new to building a Lightning Web Component and I have what feels like a basic validation using the row's data for inline editing, but I have been unable to figure out. I have a simple table with a ...
  • 3
0 votes
1 answer
241 views

Error "Sorry to interrupt. This page has an error. You might just need to refresh it" in lwc while doing rowaction in datatable

i created an two lwc component in one component i am doing search for an accounts and in another component where i am getting the account list and displaying in data table.while doing row actions in ...
0 votes
4 answers
344 views

Records not appearing on account dataTable

I am not able to pull any of the related records to the account dataTable. I want to see the related records for Trade_Lanes__c on the data table, but nothing shows up. Below is my code. Apex ...
0 votes
1 answer
151 views

How could I avoid nested for each in a HTML (LWC component)?

I'm starting to create a modal like in this picture, but I only got it doing nested for each (line 42 and 43 of the .html) for the table. That's not good practice, right? So how could avoid it? I ...
  • 123
1 vote
1 answer
340 views

Datatable LWC tbody in another component

I am trying to use another component in tbody for a custom data Table in LWC when i use /iterate records in tbody , it is renderinng fine and giving expected result Single Component <template> ...
1 vote
1 answer
418 views

How to wrap cell text properly in datatable in LWC?

I'm struggling with the issue, where cell text in the datatable in LWC isn't wrapping correctly. It obscures the cell from the next column in some cases. I didn't applied any formatting for that table ...
  • 11
2 votes
1 answer
205 views

How to refresh datatable after saving form in Visualforce with CustomController

I'm trying to create a apex:form with an input section where several fields are rendered and the user can save the record. Below this form, is an apex:datatable. I want to rerender the input fields ...
  • 1,318
1 vote
1 answer
711 views

How to copy data from Excel to LWC lightning datatable? [closed]

With the given requirement to allow users to paste content into multiple cells of a LWC lightning-datatable, where the user has previously copied those values from an Excel sheet, what would be the ...
0 votes
1 answer
177 views

How to create and call a JS function from another LWC?

I want to create a utility class that has this two methods for order a datatable column: function sortBy(field, reverse, primer) { const key = primer ? function (x) { return ...
0 votes
1 answer
682 views

LWC Data Table not getting refreshed on click of delete button

LWC Data table is not getting refreshed on delete of a row. code below: import { LightningElement,wire,track,api } from 'lwc'; import distProfileShareList from '@salesforce/apex/...
  • 9
0 votes
0 answers
17 views

How can I change the icon color in the rows of the lightning table?

I want to change the color of the iconName of the row in my table, can someone help me? If not, I would like to use a static resource on the text side of my lightning table cell Has anyone experienced ...
0 votes
1 answer
574 views

LWC - dynamically update a datatable column to editable

Just need some help to dynamically update a datatable column to make it editable. In my column definitions - I need to make a stock level column editable based on the results of my @wire call. Stock ...
  • 133
0 votes
2 answers
3k views

Is there any option to remove header checkbox of Lightning datatable?

I just want to know is there any way to remove/hide/disable the select all checkbox of header in lightning Aura Component, if there is any way please tell...
0 votes
1 answer
68 views

How to show data from SObject variable(SobjList) using Apex pageBlockTable? The variable has SOQL query Result. Please find below my Apex and VF code

I want to display field names along with records of Project__c object on my VF page but I am unable to do that; Visual Force Page code: <apex:page controller="WorkOnFields"> <apex:...
0 votes
1 answer
784 views

on click action for specific column in data table

How to have on click action for specific column in data table in lwc. consder this as example, js: columns = [ {label: 'Opportunity name', fieldName: 'opportunityName', type: 'text'}, {label: '...
3 votes
1 answer
762 views

Datatable suppress-bottom-bar attribute - what's the use?

In the <lightning-datatable> documentation, there's an attribute suppress-bottom-bar which "If present, the footer that displays the Save and Cancel buttons is hidden during inline editing.&...
  • 531
0 votes
2 answers
1k views

Programmatically / Automatically Save Inline Edits on Datatable [closed]

I have a <lightning-datatable> where I want the user to be able to make edits to it, and those changes are automatically saved so that when I call getSelectedRows(), I get all the updated data ...
  • 531
0 votes
0 answers
86 views

Link to record === Instead of displaying a text (String)

I'm trying to add a datatable component to a flow in order to display knowledge articles. I've downloaded the component online. Unfortunately the component doesn't give me the possibility to access my ...
1 vote
2 answers
149 views

datatable not showing changes when modifying properties in data

I'm trying to achieve a row action which copies the values of the columns of the previous row, into the row I trigger the action. Seems simple enough, but for some reason, when updating the properties,...
1 vote
1 answer
2k views

How to control the height of datatable dynamically in LWC?

I wish to control the height of a datatable based on the number of records present. If there are less than 10 rows, the height of the datatable should be just enough to show all rows. There should ...
  • 1,064
1 vote
1 answer
64 views

PDF generation failed. Check the page markup is valid. Issue with datatable and columns tags

When rendering a visualforce page as PDF, I'm running into the error above often and have been unable to figure out what the error is. Through process of elimination, I have been able to narrow down ...
  • 49
1 vote
1 answer
3k views

Add pagination in a lightning: datatable [duplicate]

I have received the documentation and I have not found the option to add a page to the table. https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example
1 vote
1 answer
925 views

How can I add a hyperlink to a record of a custom object in LWC?

I currently have a custom list view LWC that displays a list of custom objects and its fields. I want to have a hyperlink on a specific field that takes the user to the record page. So, the html for ...
  • 73
4 votes
1 answer
2k views

LWC lightning-datatable not accepting cellAttributes in the first column

Lightning-datatable is not accepting any cellattributes in the first column. All other columns are formatting correctly. Is this a limitation, or am I doing something wrong? (Irrelevant code removed ...
0 votes
1 answer
296 views

JQuery Datatable in LWC responsive not working

I am using JQuery Datatable in LWC (https://datatables.net/extensions/responsive/examples/) which i can use both in desktop and mobile version . I am trying to achieve the below responsiveness where ...
0 votes
1 answer
248 views

ignore a specific row when sorting in lightning-datatable

So, I'm displaying some information on a lightning-datatable. The last two columns, show two different kind of prices, so for each page in the datatable, I add a last row at the end to show to total ...

1
2 3 4 5 6