table.row( { selected: true } ).data() returns undefined

table.row( { selected: true } ).data() returns undefined

CSMAtrackerCSMAtracker Posts: 9Questions: 4Answers: 0

I'm trying to get the data for the selected row under "preSubmit" event for editor. I saw on the forum
"table.row( { selected: true } ).data()" should do it but it returns undefined. How can I get the selected row's data?

Answers

  • CSMAtrackerCSMAtracker Posts: 9Questions: 4Answers: 0

    Also when creating a custom button the action is "edit" in the datacontent on "preSubmit" I would like to change the action name or set a flag to identify when his button is fired to run a custom code. Any idea how this can be done?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    For the first question, that should work, but the easiest way would be to use the second argument to preSubmit, as that contains the data about to be submitted. This example is demonstrating both.

    For your second question, this example from this thread may help - it's showing how to change the text of a button, and how to tell which button has been pressed.

    For the first

Sign In or Register to comment.