سلام و روز خوش
1- شما یک tr هم در thead دارین که اون هم حساب میشه،
باید از tbody شروع کنین.
2- اون next هم پوینتر رو میبره رو tr بعدی و نباید باشه:
با استفاده از jQuery
function EditItemRow(rowIndex) {
const percent = $('#Itemdatatable tbody tr').eq(rowIndex)
.find($('input[name$="Item_Percentage"]')).val();
alert(percent);
}
function EditItemRow(rowIndex) {
const percent = $(`input[name$="Items[${rowIndex}].Item_Percentage"]`).val();
alert(percent);
}
جاوااسکریپت خالص
function EditItemRow(rowIndex) {
const currentRow=document.querySelectorAll("#Itemdatatab le tbody tr")[rowIndex];
const percent = currentRow.querySelector('input[name$="Item_Percentage"]').value;
alert(percent);
}
function EditItemRow(rowIndex) {
const percent = document.querySelector(`input[name$="Items[${rowIndex}].Item_Percentage"]`).value;
alert(percent);
}