function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jojoforcejojoforce 

Hide the column header and row borders/line for lightning:datatable

How do you hide the table column header and also now have any border on the lightning:datatable?

Desired Output:
User-added image
Code Snippet
<lightning:datatable class="slds-table slds-table_cell-buffer slds-table_header-hidden"
                        columns="{! v.columns }"
                        data="{! v.data }"
                        keyField="id"
                        onrowaction="{! c.handleRowAction }"
                        hideCheckboxColumn="true"
                        hideTableHeader="true"/>
Result
User-added image
AbhishekAbhishek (Salesforce Developers) 
Try the suggestions as mentioned in the above blog (https://salesforce.stackexchange.com/questions/250076/hide-the-default-row-number-from-1st-column), It might help you.

For further reference, you can check this too,

https://salesforce.stackexchange.com/questions/231226/how-do-i-get-lightningdatatable-to-do-some-undocumented-thing-x


I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.