+ Start a Discussion
Sachin Bhalerao 17Sachin Bhalerao 17 

Data Insert using lightning data table?

Dear Team ,

Greetings !!!

Team i want to ask if i want to insert data using Lightning Data table in lightning component is it possible ? I am able to perform inline edit using lightning data table . If i pass data to apex class in insert menthod is it possible that data get saved . M facing error .

Thanks & Regards
Sachin Bhalerao

 
Best Answer chosen by Sachin Bhalerao 17
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi sachin ,
I was confused by seeing inline edit in your question.As far as I know with lightning data we can only fetch,display data and perform inline edit ,certain actions like sorting,scrolling . 

All Answers

Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi sachin,
This is possible .We can save data entered lightning data table by passing it to apex method.

Please refer below link which might help you in this
https://sfdcfacts.com/lightning/editable-lightningdatatable-summer18-feature/

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards
Sachin Bhalerao 17Sachin Bhalerao 17
Hi Devi ,

This code is updating data not inserting . I want to occupy new row in table.

Regards
Sachin Bhalerao
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi sachin ,
I was confused by seeing inline edit in your question.As far as I know with lightning data we can only fetch,display data and perform inline edit ,certain actions like sorting,scrolling . 
This was selected as the best answer
Sachin Bhalerao 17Sachin Bhalerao 17
ok i understand .