I work on asp.net core razor pages i face issue rows not have same height why this issue happen
i use datatable
html table
Python
Show
5
10
15
20
25
All
entries
@* *@
LPO NO
Item Code
Asset Id
@* AccountCalssName *@
Class
Sub Class
Description
DetailClassName
SelectedMCUName
Parent Id
Serial No
Asset Owner
Emp Id
Module
TaggingModule
@if (Model.DisplayAssetTaggingDetails.AssetWithTaggingListData != null)
{
@foreach (var AssetData in Model.DisplayAssetTaggingDetails.AssetWithTaggingListData)
{
@AssetData.LPONO
@AssetData.ItemCode
@AssetData.AssetItemNo
@AssetData.AccountCalssName
@AssetData.EquipmentClassName
@AssetData.DescClassName
@AssetData.DetailClassName
@AssetData.SelectedMCUName
@AssetData.ParentNo
@AssetData.SerialNo
@AssetData.AssetOwner
@AssetData.EmpNo
@AssetData.Module
@AssetData.TaggingModule
}
}jquery code
JavaScript
var initialPageLength = 15; // Set the desired initial value
// Set the initial value of the dropdown
$("#page-length").val(initialPageLength);
//----hashed before-----
var table = $('#example').DataTable({
"bFilter": false,
dom: 'Bfrtip',
autoWidth: false,
"paging": true,
"scrollXInner": "120%",
// "scrollX": true,
"order": []
});
$('#example').find('th, td').addClass('dt-wrap').css({
'height': '30px', // Set the desired height value
'padding': '8px' // Set the desired padding value
});
// Set the initial value of the dropdown
$('#page-length').val(initialPageLength);
// Set the number of rows per page and redraw the DataTable
table.page.len(initialPageLength).draw();
$('#page-length').on('change', function () {
var selectedValue = parseInt($(this).val()); // Get the selected value from the dropdown
table.page.len(selectedValue).draw(); // Set the number of rows per page and redraw the DataTable
});
// Trigger the change event to update the table
// $("#page-length").trigger("change");
//--apply word wrape---
var columnsToWrap = [4,5,6,7,8,9]; // Specify the column indices to apply text wrapping
columnsToWrap.forEach(function (columnIndex) {
$('#example tbody td:nth-child(' + columnIndex + ')').each(function () {
var $cell = $(this);
var text = $cell.text();
// Add a CSS class to the cell if the text is long
if (text.length > 7) {
$cell.addClass('wrap');
}
});
});issue display as image below rows not have same heigh so how to solve this issue please


Vishal JoshiRank #377 · 6.7K reputationPosted Mar 13, 2024, 7:54 AM EDT
Hello Ahmed,
Can you please scroll right and check any column wrap the value to next line?
if wrap to next line you need to remove wrap to make all rows hight same.
Thanks
Vishal Joshi
ahmed salahRank #2,240 · 628 reputationPosted Mar 13, 2024, 8:16 AM EDT
no word wrap i check it i don't know why this happen