grid.cshtml
-
@modell IEnumerable @using MvcPagingApp; @using MvcPagingApp.Models; @{ Layout = null; ViewBag.Title = "grid"; } grid .table { margin: 4px; border-collapse: collapse; width: 300px; } .header { background-color: gray; font-weight: bold; color: #fff; } .table th, .table td { border: 1px solid black; padding: 5px; } @**@ var idvalue =""; function msg(id) { idvalue =id; parseInt(idvalue) $.ajax({ url:"@Url.Action("GetData","Employee")", data:{id:id}, method:"GET", success:function (data) {//alert(data); $("#Editdialog").html(data); // $("#dialog").html(data); //$("#txtNameE").val(data.Name); //$("#txtGenderE").val(data.Gender); //$("#txtEmailE").val(data.Email); $('#Editdialog').dialog("open"); // alert("data is saved sucessfully"); }, error:function() { } }); } $(document).ready(function () { var email = document.getElementById("txtEmail").value; var emailRegEx = /^(([^<>()[\]\\.,;:\s@@\"]+(\.[^<>()[\]\\.,;:\s@@\"]+)*)|(\".+\"))@@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var dialogDiv = $('#dialog'); var isvalid = true; dialogDiv.dialog({ autoOpen: false, resizable: false, modal: true, buttons: { 'Save': function () { var checkedradio = $('[name="Gender"]:radio:checked').val(); alert(checkedradio); if ($("#txtName").val() !== "") { $('#lName').hide();</x-turndown>