I want to fill data in a cell with ajax data

I want to fill data in a cell with ajax data

arsalansiddiquiarsalansiddiqui Posts: 128Questions: 15Answers: 0

I want to put data in cells as the above image when button click it gets data pass through ajax thenprocess it then retun and show it the blank cell

Answers

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    You can use row().data() or cell().data() to update the row data. Use one fo these APIs in your Ajax success function.

    Kevin

  • arsalansiddiquiarsalansiddiqui Posts: 128Questions: 15Answers: 0

    I read the API but i dont know how to use in my case.
    I mean i render a button which has function and function has parameter id so i can get id then pass it to ajax, after what. How to show the ajax data in the blank area i mean how do i get array position that this row this column this cell.
    I hope i made it easy to understand.

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    I updated one of my examples to demonstrate. It doesn't use Ajax but will show you how to get the row data, update the data and place the updated data back into the row.
    http://live.datatables.net/xijecupo/86/edit

    Kevin

  • arsalansiddiquiarsalansiddiqui Posts: 128Questions: 15Answers: 0

    After clicking it returns to first page

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    The draw() API has a parameter to control the paging. Using false will stay on the same page.

    Kevin

This discussion has been closed.