Returning Selected Row ID

Returning Selected Row ID

NJDave71NJDave71 Posts: 40Questions: 3Answers: 0
edited June 2011 in General
Can someone please advise on how I can pass the ID of selected row. this is what's passed to the sUpdateURL. I need to pass this to another function after the update completes.

Thank you

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    How are you doing your row selection? If you have a reference to the selected node (presumably by a selector or something) then can't you just do node.id to get the id?

    Allan
  • NJDave71NJDave71 Posts: 40Questions: 3Answers: 0
    Hello Allan:

    I am using the makeEditable function followed by
    [code]
    indicator: 'Saving Notes...',
    tooltip: 'Click to edit Notes',
    type: 'textarea',
    rows: 10,
    cols: 20,
    submit: 'Save changes',
    sUpdateURL: "service/updatedata.ashx"
    [/code]

    This works nicely and does the POST. but I would like to return the Id and pass it in a function.

    [code]
    fnOnCellUpdated: function (sStatus, sValue, settings) {sendemail(Id)
    [/code]


    Thank you
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    This might be a daft question - but what is the makeEditable function? Is that in Jovan's Editable library: http://code.google.com/p/jquery-datatables-editable ? I know Jovan checks in on this forum now and then, but it might be worth while opening an issue in the Google code project (assuming you are using that library - or is it something else?).

    Allan
  • NJDave71NJDave71 Posts: 40Questions: 3Answers: 0
    Allan:
    Yes, this is part of Jovan's Library.

    However, I have solved the problem. The ID field is in the POST so, I just added another function to my Web service to handle the email.

    Thanks for your help.
  • dvnandoverdvnandover Posts: 42Questions: 0Answers: 0
    I need to update the value in the first column of my table with the id of the newly added row after the user click the Add button (and the data has been saved to the database), how do i do that? Can someone show me some example codes?
This discussion has been closed.