if you know the id of the row you want, go directly to it:
var tempvar = $('#selectedrowid').text();
alert(tempvar);
keep in mind, however, that ID's cannot start with a number. Because of this, you may not be able to select by ID in some browsers when the ID starts with a number.
-- Kevin