I have one partial view page having 3 radio buttons namely All Employees,Designation & Confirmation Date.By default first is selected.on click of third radio button i need to enter date in textbox after that ajax call is made and data filtered by date is renderd in div tag.
///the following is code for that partial view
@model HRMS.Models.EligibilityCriteriaModel
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("../../Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
@{
ViewBag.Title = "Index";
}
@Html.HiddenFor(modelItem => modelItem.allConfirmationDateEmployeeListCount, new { id = "ConfirmationDateEmpListCount" })
@if (Model.allConfirmationDateEmployeeList != null)
{
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="tbl_allEmployees"
class="TablesBlueHeaders">
<thead>
<tr>
<th width="10%" class="bluebgtable1">
Employee Code
</th>
<th class="bluebgtable1" width="15%">
Employee Name
</th>
<th class="bluebgtable1" width="15%">
Delivery Team
</th>
<th class="bluebgtable1" width="15%">
Designation
</th>
<th class="bluebgtable1" width="15%">
Confirmation Date
</th>
<th class="bluebgtable1" width="15%">
Select
</th>
</tr>
</thead>
<div class="abc" id="SampleID">
@foreach (var item in Model.allConfirmationDateEmployeeList)
{
<tr id="@item.EmployeeID" class="highlightRed">
<td align="center">
@Html.DisplayFor(modelItem => item.EmployeeCode, new { @readonly = "readonly" })
</td>
<td>
@Html.DisplayFor(modelItem => item.EmployeeName, new { @readonly = "readonly" })
</td>
<td>
@Html.DisplayFor(modelItem => item.DeliveryTeam, new { @readonly = "readonly" })
</td>
<td>
@Html.DisplayFor(modelItem => item.Designation, new { @readonly = "readonly" })
</td>
<td>
@Html.DisplayFor(modelItem => item.ConfirmationDate, new { @readonly = "readonly" })
</td>
<td align="center">
@Html.CheckBoxFor(modelItem => item.Checked, new { @class = "chkAllConfDateEmployees", @id = item.EmployeeID, @for = item.AppraisalYearID })
</td>
</tr>
}
</div>
</table>
}
이제이보기가 div로 렌더링됩니다. 내 자식 부분보기에서 나는 change 이벤트를 기대할 수없는 checkbox.which 변경 이벤트를 얻을 수 없습니다.체크 박스 변경 이벤트가 부분보기 내부에서 작동하지 않습니다.
이미지는 텍스트 상자와 검색 버튼이있는 부분보기 페이지를 보여줍니다. 버튼을 클릭하면 검색 버튼 아래 div 태그에 다른 부분보기가 렌더링됩니다.이보기에는 체크 박스가 있고 확인란은 변경 사항이 아닙니다. 저기서 일 해요. 희망 하시겠습니까? [image description here] [1]
후 당신이 코드있어, 그리고 오류가 콘솔에 점점 할 수있다 –
@sid의 D :.. 당신은 당신의 jQuery 코드를 게시 할 수 있습니다 또한 – Thulasiram
@downvoter : 작은 자비를 첫 번째 타이머에 표시하십시오. – naveen