IDs in an HTML document must be unique. Only one element in the document can have the ID
Item
, so
$('#Item')
(or
document.querySelectorAll('#Item')
) will only ever return a single element.
Based on your description, your
table's ID is
Item
. If you call
$('#Item').eq(1)
you are asking for the second element in the document with the ID
Item
, which obviously can't exist.
I suspect you want something like:
$('#Item').find('tr').eq(row).trigger('change');
or
$('#Item tr').eq(row).trigger('change');
NB: If you have nested tables, this will not work properly; the rows of the nested tables will also be matched by the
tr
selector.
Assuming you've structured your table properly, you'll need:
$('#Item > tbody > tr').eq(row);