You are working with templates, so your ids are never will be presented in the grid, otherwise you should end up with numerous elements with the same id. Think about a data set with 10 rows! In every row there is a hidden field, but their ids must be different!
You may use a class based jQuery selector:
$("input.H")