You need to sign in to do that
Don't have an account?
SFDC Forum 9
Datatable config issue
I have custom contact detailed page in lightning, it has data table with Order (custome object )details in it.
As soon as I click on any order row in list of datatable, page should get refreshed and show selected order deatils in detiled section page.(I have apex class for this and I have code for this entire process in classic vf page and now rewriting it in lightning component)
All I need is, on row seletion, will have to pass Index of the seleted row and two more field values to the apex method to get this process done.
As soon as I click on checkebox of any row in the datatable of lightning compoenent, by using onrowselection, below function will get called.
updateSelectedParticipant : function(component, event, helper) {
//{!P.Index}','{!P.Ind_Id}' ,'{!P.Ga_Id}
var arrayRow = event.getParam('selectedRows');
console.log('selected row: ', arrayRow);
var selectedIndex=arrayRow[0].Index;
console.log('Index :', +selectedIndex);
var selectedrowIndID=arrayRow[0].OrderId_ID;
console.log('IndID :', +selectedrowIndID);
here, I gave arrayRow[0] just to check functionality.Now will have to make it dynamic.So instead of 0, will have to get the index of the row whichever user selects,how can I do that, please asssit.
As soon as I click on any order row in list of datatable, page should get refreshed and show selected order deatils in detiled section page.(I have apex class for this and I have code for this entire process in classic vf page and now rewriting it in lightning component)
All I need is, on row seletion, will have to pass Index of the seleted row and two more field values to the apex method to get this process done.
As soon as I click on checkebox of any row in the datatable of lightning compoenent, by using onrowselection, below function will get called.
updateSelectedParticipant : function(component, event, helper) {
//{!P.Index}','{!P.Ind_Id}' ,'{!P.Ga_Id}
var arrayRow = event.getParam('selectedRows');
console.log('selected row: ', arrayRow);
var selectedIndex=arrayRow[0].Index;
console.log('Index :', +selectedIndex);
var selectedrowIndID=arrayRow[0].OrderId_ID;
console.log('IndID :', +selectedrowIndID);
here, I gave arrayRow[0] just to check functionality.Now will have to make it dynamic.So instead of 0, will have to get the index of the row whichever user selects,how can I do that, please asssit.