Using fnUpdate

Using fnUpdate

jeffrobinsonjeffrobinson Posts: 4Questions: 0Answers: 0
edited October 2011 in General
Hi
I need some help in the use of fnUPdate. Is it possible to update a row based on the id of a row rather than its position?. For example, assume that the rows of the table all have unique ids, and one such row is .... I am looking to update of the follow form:
$mytable.fnUpdate($rowarray,rowid,0)
Thanks - J

Replies

  • OmnimikeOmnimike Posts: 22Questions: 0Answers: 0
    edited October 2011
    I don't use this approach myself, but I think it should work something like this:
    [code]
    $('#idOfGrid').fnUpdate(['colOne', 'colTwo'], $('#idOfRow')[0]);
    [/code]

    fnUpdate allows you to send it the tr element instead of the index of the row, and because your rows have ids this means you can get their tr element using jquery.
  • jeffrobinsonjeffrobinson Posts: 4Questions: 0Answers: 0
    Omnimike
    Thanks for the response. I wasn't sure what the doc meant by a node - an elemental node from the HTML? But using a jquery object looks reasonable. if I have any issues I'll post them.
    Thanks - J
This discussion has been closed.