how to get first td value of a selected row

how to get first td value of a selected row

dyapasrikanthdyapasrikanth Posts: 20Questions: 0Answers: 0
edited April 2011 in General
My data is going to be generated from the server side depending upon user search criteria.
When user selects the row then the first td values has to be captured for the future use.

How can i do this.

Replies

  • dwaddelldwaddell Posts: 22Questions: 0Answers: 0
    edited April 2011
    If you have a selectable jQuery set:

    $(your_set).find('td:first')
  • dyapasrikanthdyapasrikanth Posts: 20Questions: 0Answers: 0
    edited April 2011
    I am new to jquery, I have a problem with this code.
    It is not giving correct result
  • dyapasrikanthdyapasrikanth Posts: 20Questions: 0Answers: 0
    edited April 2011
    how to move through the rows with keyboard arrows and after pressing enter key on particular row then i want to do some work like storing the first td value in the textbox and close the modal window on which this datatable is displaying.
    so the initial cursor stage should be positioned at the first row just like a datagrid in ie
  • ashuaticashuatic Posts: 1Questions: 0Answers: 0
    Ok dude its easy -
    $("#BLTable tbody").click(function(event) {
    $(JQTable.fnSettings().aoData).each(function (){
    $(this.nTr).removeClass('row_selected');
    });
    $(event.target.parentNode).addClass('row_selected');
    GetSelectedRowData(event.target);
    });
    function GetSelectedRowData(Obj) {
    alert(Obj.innerHTML)
    }

    See.. Enjoy. .
This discussion has been closed.