Working with the Select extension & Salesforce Apex?
Working with the Select extension & Salesforce Apex?
There are a few things that I need help with & I've looked everywhere...
I am building a Datatable with the Select extension inside a Salesforce Visualforce page.
I would like to figure out how I can set the associated record inside the Salesforce controller to true when I select it on the Datatable.
I would also like to sum the selected rows and add the value to a cell in the footer.
You can find my code for the page and controller here...
https://jsfiddle.net/a13xy/ho7n121x/1/
Thanks in-advance for any help/insight
This question has an accepted answers - jump to answer
Answers
I'm afraid I know nothing about SaleForce so I can't help with that aspect. however, you would use a
selected
event handler on the row androw().data()
to get the data for the clicked row.The selected event handler could also do that and use
column().footer()
to get the footer cell that you need to write into.Allan
Thanks for the references allan!
Can you please help me figure out how to determine if the Datatables Select checkbox is checked & also how to locate the hidden input checkbox within that same row in the first cell and check that as well.
Here is what I think will help me do this...
That basically looks okay to me. If it isn't working I'd need a link to a test case using JSFiddle or http://live.datatables.net to demonstrate the issue.
Allan
Everything seems to be working okay except it only works on the first click after the page loads.
So when the page loads I can click the Datatables Select checkbox and the associated input checkbox will check but after I deselect the Datatables Select checkbox and select it again the associated input checkbox does not check.
You can see the problem in this fiddle...
https://jsfiddle.net/a13xy/de7jfgy6
Here is my code...
I'm not seeing that issue in the fiddle I'm afraid. These are the steps I took:
This is with Chrome / Mac.
Is that not what you are seeing?
Allan