Exclude Search Value from hidden dropdwon value

Exclude Search Value from hidden dropdwon value

prasenjitbaruaprasenjitbarua Posts: 7Questions: 3Answers: 0
edited November 2021 in General

My project in .Net Core. I have a Grid which has editable inline row. That's why I bind the editable dropdown for that which is hidden. Now when I search something, the search result populate from that hidden dropdown list also which is not I want. So I want to ignore Search result from hidden dropdown value.
here is my html:

<td class="CompanyName">
                    <span>@item.CompanyName</span>
                    <select name="ddlcompany" id="ddlcompany" class="CompanyList" asp-for="@item.CompanyId" asp-items="@item.CompanyList" style="display:none">
                    </select>
                </td>
<td class="BusinessUnitName">
                    <span>@item.BusinessUnitName</span>
                    <select name="ddlbusinessunit" id="ddlbusinessunit" class="BusinessUnitList" asp-for="@item.BusinessUnitId" asp-items="@item.BusinessUnitList" style="display:none">
                    </select>
                </td> 

Here is my Jquery:

 $(document).ready(function () {
 $("#DepartmentTable").DataTable({
            "pageLength": 5,
            "lengthMenu": [5, 10, 25, 50],
            "order": []
            });
  })

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

Sign In or Register to comment.