To show a lookup field and editit in the same table, you need to create a new component an set it to your datatable through a Custom Datatable Types.
Here you have an article that do it step by step: https://techdicer.com/lookup-field-in-lwc-datatable-inline-edit/ And a repository: https://github.com/Sarveshgithub/sfdc-lwc-lightning-datatable
To do this, use the "Related List - Single" component in Salesforce's Lightning Record Page. Configure the component to select the desired related object, set the fields to display, and enable editing if required. Save and activate the Lightning Record Page. Salesforce will generate the datatable with clickable lookup links and show recent records automatically. No custom code is needed.
If above answer helped you ,mark it as best answer.
Here you have an article that do it step by step: https://techdicer.com/lookup-field-in-lwc-datatable-inline-edit/
And a repository: https://github.com/Sarveshgithub/sfdc-lwc-lightning-datatable
Let me know if it helps you.
Hello Yadhagu,
To do this, use the "Related List - Single" component in Salesforce's Lightning Record Page. Configure the component to select the desired related object, set the fields to display, and enable editing if required. Save and activate the Lightning Record Page. Salesforce will generate the datatable with clickable lookup links and show recent records automatically. No custom code is needed.
If above answer helped you ,mark it as best answer.