hi friends,
i have one grid view with alternate color row in asp.net MVC. i also include delete and edit functionality to each row but after deleting one row the color is not maintain well means sequence of alternate row is miss mach so it create bad row design what should i do to solve this problem.
following is the image before deleting ...


Manoj BhoirRank #599 · 4K reputationPosted Jun 15, 2015, 4:32 AM EDT
$("tr:even").css("background-color", "#F4F4F8"); $("tr:odd").css("background-color", "#EFF1F1"); You are setting css two times for odd rows.Manoj BhoirRank #599 · 4K reputationPosted Jun 13, 2015, 10:47 PM EDT
Amit Samnani138 reputationPosted Jun 15, 2015, 2:05 AM EDT
var DomainId = $("#hdnId").val();
var DomainId1 = $("#hdnId1").val();
var Searchtxt = "";
var NextCount = 1;
var ParamData = { DomainId: DomainId }
$.ajax({
url: "/Settings/DeleteDomain",
type: "POST",
data: JSON.stringify(ParamData),
dataType: "json",
contentType: "Application/json; charset=utf-8",
success: function (result) {
HidePopUp('DivDeleteConfirm', 'blur');
var PopUp = document.getElementById("DivDeleteConfirm2");
var blur = document.getElementById("blur");
SetBlurDiv(PopUp, blur);
$("tr:odd").css("background", "#ededed");
// $("#divGrid").load('/Settings/DomainSettings #divGrid');
$("tr:odd").css("background", "#ededed");
document.getElementById("txtSearch").value = "Enter your search here...";
document.getElementById("grdLeadQueue").deleteRow(DomainId1);
$("#hdnId").val(0);
NxtCount = 1;
//$("#divGrid").load('/Settings/LoadOnScroll?Searchstr=' + Searchtxt + '&NextCount=' + NextCount + ' #divGrid');
// $("tr:odd").css("background", "#ededed");
},
error: function (data) {
if (data.status === 401) {
Logout();
return;
}
},
complete: function () {
// $("tr:odd").css("background", "#ededed");
}
});
// $("tr:odd").css("background", "#ededed");
}
Amit Samnani138 reputationPosted Jun 15, 2015, 2:08 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jun 15, 2015, 2:10 AM EDT
$("tr:odd").css("background", "#ededed");
// $("#divGrid").load('/Settings/DomainSettings #divGrid');
$("tr:odd").css("background", "#ededed");
document.getElementById("txtSearch").value = "Enter your search
Amit Samnani138 reputationPosted Jun 15, 2015, 4:19 AM EDT
Amit Samnani138 reputationPosted Jun 15, 2015, 4:43 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jun 15, 2015, 4:47 AM EDT