Challenge in getting the currently selected row's ID

Challenge in getting the currently selected row's ID

JackRazorsJackRazors Posts: 1Questions: 1Answers: 0

I wanted 3 buttons on the top of the datagrid. Add, Edit and Delete. If you have a row selected, then edit and delete will redirect you to the edit pages I already have written. How can I get that ID?

JSFiddle:
https://jsfiddle.net/qy9hgodn/4/

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    I am a bit confused. your buttons on the fiddle are showing us the ids

  • PaulusPaulus Posts: 69Questions: 17Answers: 5

    Try this...

    var selectedData = dt.row({ selected: true }).data();
    alert('Selected ID: ' + selectedData[0]);
    
This discussion has been closed.