access datatable properties outside the princal data table function, that is, in the scoope
access datatable properties outside the princal data table function, that is, in the scoope
Coder102
Posts: 78Questions: 2Answers: 0
Hello, I want to access the properties of the datatable but outside of it, does anyone know how to do it? Mainly to the columns. I put a button in the datatable inside a row and I want to do it with a function outside the datatable that expands or collapses by pressing that button in the row and accessing the columns in a function that is in the scoope
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Please don't post duplicate questions. You asked the same in these other threads:
https://datatables.net/forums/discussion/64299/acceder-a-propiedades-del-datatable-fuera-de-la-funcion-principal#latest
https://datatables.net/forums/discussion/64295/use-datatable-out-datatable-function#latest
Are you asking for something like this example?
https://datatables.net/examples/api/row_details.html
Kevin
no, because in the html I have nothing, I create everything directly inside the datatable in this way
and and or I want to access the properties of columns in a separate function like this
change the function that I show in the last photo for this one, but I don't know how to access the rows that are inside the data table function, my idea is to press a button and that new columns are generated
The Child Details example I linked to shows how to get the row data. Or you can look at this example.
I also have a buttons example:
http://live.datatables.net/xijecupo/1/edit
Do any of these help?
If not maybe you can build a test case showing the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
This is mi code and inside is my doubt
Please build a running test case that we can help you with. Trying to debug pages of code is not easy.
How do you want them displayed, in a modal maybe?
Kevin
I want to click on the btnExpandCollapse button to show the columns of "Read", "Task", "Write" that are inside the datatable.
I see you have them set to hidden using
columns.visible
. Thecolumn().visible()
orcolumns().visible()
can be used to unhide the columns. IS this what you want?Kevin
Thanks, it worked for me!