Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 answer
12 views

Varied Column Widths in Visualforce Table

When I widen the width of the first column (left-justified) labeled "Opportunity", it widens all left columns in the table. I want the first line of the table to be the full width of the ...
user avatar
0 votes
1 answer
61 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 ...
user avatar
0 votes
1 answer
54 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 ...
user avatar
0 votes
1 answer
24 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" > &...
user avatar
0 votes
0 answers
44 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={...
user avatar
  • 529
0 votes
0 answers
20 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 ...
user avatar
0 votes
1 answer
26 views

Aura Component Datatable not showing data

*** Component *** <aura:component controller ="VehicleController"> <aura:attribute name="VehicleSelected" type="String"/> <aura:attribute name =&...
user avatar
  • 3
0 votes
1 answer
68 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=&...
user avatar
0 votes
2 answers
49 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 ...
user avatar
0 votes
1 answer
68 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 ...
user avatar
  • 3
0 votes
1 answer
57 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 ...
user avatar
0 votes
4 answers
58 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 ...
user avatar
0 votes
1 answer
56 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 ...
user avatar
  • 123
1 vote
1 answer
163 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> ...
user avatar
1 vote
1 answer
121 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 ...
user avatar
  • 11
2 votes
1 answer
66 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 ...
user avatar
  • 1,268
1 vote
1 answer
331 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 ...
user avatar
0 votes
1 answer
60 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 ...
user avatar
0 votes
1 answer
377 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/...
user avatar
  • 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 ...
user avatar
0 votes
1 answer
254 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 ...
user avatar
  • 113
0 votes
2 answers
1k 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...
user avatar
0 votes
1 answer
42 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:...
user avatar
0 votes
1 answer
354 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: '...
user avatar
2 votes
1 answer
371 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.&...
user avatar
  • 461
0 votes
2 answers
678 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 ...
user avatar
  • 461
0 votes
0 answers
31 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 ...
user avatar
1 vote
2 answers
50 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,...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
  • 1,004
1 vote
1 answer
57 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 ...
user avatar
  • 49
1 vote
1 answer
1k 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
user avatar
1 vote
1 answer
649 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 ...
user avatar
  • 73
4 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
207 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 ...
user avatar
  • 1,516
0 votes
1 answer
145 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 ...
user avatar
0 votes
1 answer
208 views

Is it possible to Get clicked row value and know whether row is selected or not in lightning:datatable

In lightning:datatable, is it possible to know whether the row is checked or unchecked if yes, then which row using keyfield? In lightning datatable I have modified the onrowselection event to ...
user avatar
  • 321
0 votes
1 answer
53 views

Can I output the data to a datatable in my case?

I have a datatable in which I want to display the data in a certain way, namely: I have an Exchange_Rate__c object that has certain currency rates as fields: USD__c, CAD__c, EUR__c, GBP__c, as well as ...
user avatar
0 votes
1 answer
326 views

I want to render two data table based on condition..both data table are present in the same lightning web component!

here I have one product data table without checkbox,this is the default one,but when I navigate from opportunity page to product page to add products to opportunity,to add product I need to render ...
user avatar
0 votes
1 answer
1k views

LWC open hyperlink record from datatable

I have created a custom datatable and my goal is to open the records directly as a subtab from the table via hyperlink. The field is clickable, but it's opening on a new tab and is blank .. This is ...
user avatar
  • 139
0 votes
1 answer
572 views

LWC: Datatable not getting correct row number on Action

I am not able to retrieve the correct line of the datatable on my LWC. Ive followed several searches but apparently Im still missing something. Here is the HTML: <lightning-datatable ...
user avatar
1 vote
1 answer
3k views

Inline Editing field needs to be required field in Lightning Data table - LWC?

I have a lightning data table displaying a set of Records. Also, it have inline editing set true for one column called Price. Is it possible to have the Price column as Required while editing? My Cmp ...
user avatar
1 vote
1 answer
51 views

Search data based on user input

I have a datatable which is populated by a JSON object, what I want to do is this: when the user types a letter I want to display all the values that have that letter, but I still don't know how to do ...
user avatar
1 vote
1 answer
991 views

LWC variable not defined

I am creating a LWC data table and I would like that when the user click on "Edit Table" The fields in the table will get the inline edit true import { LightningElement, wire, api } from '...
user avatar
  • 281
0 votes
1 answer
40 views

How do I get a datatable component to update column actions menu?

I have a datatable column with custom actions defined like this: statusActions = [ { label: 'Show Unconfirmed Leads', name: 'unconfirmed_leads', }, { label: 'Show All ...
user avatar
  • 663
0 votes
1 answer
160 views

lightning:datatable component - hiding Save and Cancel buttons replace save with custom save -- generate json from oncellchange

I have built an LWC which utilizes a lightning datatable. I want to replace the standard save and cancel with my own custom lightning buttons. I am using suppress-bottom-bar which hides the standard ...
user avatar
  • 15
0 votes
0 answers
298 views

Hide lightning buttons on click on Pencil (Edit cell) Datatable LWC

I am struggling to hide Save/Exclude Selected Hospitals buttons on click on Pencil Icon. I need to use OOB save/cancel button of datatable on click on edit and hide the lightning buttons.
user avatar
0 votes
0 answers
42 views

Lightning Datatable render with new datasource and existing selectedRows after imperative apex call

I have a use case where i need to render the datatable with the new datasource using imperative apex call and also with the already selected rows but the table is not rendering with the selectedRows.. ...
user avatar
  • 61
0 votes
0 answers
434 views

LWC Datatable Picklist Dropdown is hiding below

I have been trying so long to solve this issue. I am extending the LWC native datatable with picklists. The dropdown is hiding below in the bottom and is not properly visible. Please suggest me a way ...
user avatar
  • 61
5 votes
1 answer
5k views

LWC - Extended lightning datatable with picklist is not working

I have use case where i need to show the values in the picklist format in lightning-datatable for which i am extending the lightning-datatable component.The datatable shows a drop-down box but i am ...
user avatar
  • 61
0 votes
1 answer
51 views

Visualforce Table - Iterate Over Two Different Objects with Same Column Headers?

I need to create a data table that contains Task and Opportunity data, but puts them together in the same table that uses days of the week for column headers. Example below - I've never seen a way to ...
user avatar
  • 628

1
2 3 4 5 6