Используйте атрибут 'data' вместо 'value'
$datasearch.append(
`<tr>
<td class="edit-btn" id="tid" data="hhh">hhh</td>
</tr>`);
Функция
<script type="text/javascript">
$(()=> {
$('body').on('click', '#tid', function() {
let $this = $(this);
let x = $this.data() || $this.attr('data');
alert(x);
}
});
</script>