You need to sign in to do that
Don't have an account?
Sainath Venkat
LWC Datatable to show records based on grouping
Can anyone help me out in creating a LWC component where I want to show group of case records based on Status Picklist.
On datatable, I want to show Cases which are active and inactive, under active I want to show all cases which are active and under inactive I want to show all cases which are inactive.
for example
ACTIVE
CASE1
CASE2
CASE3
Inactive
Case100
Case101
Case103
Active and Inactive are picklist values on case object under Status__c field
On datatable, I want to show Cases which are active and inactive, under active I want to show all cases which are active and under inactive I want to show all cases which are inactive.
for example
ACTIVE
CASE1
CASE2
CASE3
Inactive
Case100
Case101
Case103
Active and Inactive are picklist values on case object under Status__c field
>> https://developer.salesforce.com/forums/?id=9062I000000QyGmQAK
As mentioned in the above link the lwc datatable doesn't support grouping by default however there is a snippet that you can try as mentioned in the above link.
EDIT: One possibility you can check is to use lightning-tree documentation link: https://developer.salesforce.com/docs/component-library/bundle/lightning-tree/example
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
Hi Sainath,
please find the solution
If you find this solution is helpful for you please mark the best answer
Use the LWC tree grid to achieve active and inactive data in a single table.
Here is the tutorial link, which explains you: https://rajvakati.com/2018/12/30/lightning-web-component-tree-grid/
If you find this solution is helpful for you please mark the best answer