Click here to Skip to main content
15,567,994 members

Comments by Member 10004269 (Top 18 by date)

Member 10004269 23-Jun-19 13:23pm View    
.webgrid-table {
width: 90%;
display: table;
border-collapse: separate;
border: solid 0px #808080;
background-color: white;
}

.webgrid-header {
background-color: #5b7875;
color: #FFFFFF;
padding-bottom: 4px;
padding-top: 5px;
text-align: left;
font-size: 13px;
height: 13px;
font-weight: bold;
}

.webgrid-footer {
padding: 10px;
background-color: #5b7875;
color: white;
height: 25px;
}

.webgrid-alternating-row {
background-color: rgb(245, 245, 245);
color: black;
font-size: 12px;
height: 12px;
padding-left: 5px;
vertical-align: central;
font-family: Verdana;
}


.webgrid-row-style {
color: black;
font-size: 12px;
height: 12px;
vertical-align: central;
font-family: Verdana;
padding-left: 5px;
}

.webgrid-table td, th {
border: 0px solid #808080;
padding: 3px 7px 2px;
}

.webgrid-table a {
color: wheat;
}

.webgrid-table a:hover {
color: #5089d8;
}



.webgrid-header a {
background-color: #e57d2e;
color: blue;
}



.webgrid-footer a {
padding: 5px;
margin-left: 1px;
margin-right: 1px;
box-shadow: 0px 0px 2px rgb(44, 3, 6) inset;
border-radius: 5px;
color: #e57d2e;
}

.webgrid-footer a:hover {
padding: 5px;
margin-left: 1px;
margin-right: 1px;
box-shadow: 0px 0px 2px rgb(44, 3, 6) inset;
border-radius: 10px;
color: blue;
font-weight: bold;
}



.webgrid-row-style:hover {
padding: 3px 7px 2px;
/*font-size: 13px;
height: 13px;*/
/*font-weight: bold;*/
background-color: #c1c6e8;
}



.webgrid-alternating-row:hover {
background-color: #c1c6e8;
/*font-size: 13px;
height: 13px;*/
/*font-weight: bold;*/
padding: 3px 7px 2px;
}

.id {
width: 10%;
}

.name {
width: 30%;
}

.Mobile {
width: 15%;
}

.DOB {
width: 15%;
}

.address {
width: 25%;
}
Member 10004269 23-Jun-19 13:23pm View    
@model IEnumerable<webgrid2.models.employee>
@{
ViewBag.Title = "Index";
Layout = null;
}

Index



@Html.ActionLink("Create New Emplyee","Create")

@{
var grid = new WebGrid(
Model, rowsPerPage : 8,
defaultSort: "EmployeeID ,EmployeeName",
columnNames: new[] { "EmployeeID", "EmployeeName", "EmployeeSal", "EmpAge" }
);
}

@grid.GetHtml(

tableStyle:"webgrid-table",
headerStyle:"webgrid-header",
footerStyle:"webgrid-footer",
alternatingRowStyle:"webgrid-alternating-row",
rowStyle:"webgrid-row-style",

fillEmptyRows: false,
mode:WebGridPagerModes.All,

columns:grid.Columns
(
grid.Column("EmployeeID",header:"EmployeeID" + WebGrid2.Models.Helper.SortDirection (null,ref grid ,"EmployeeID")),
grid.Column("EmployeeName",header:"EmployeeName"+ WebGrid2.Models.Helper.SortDirection (null,ref grid ,"EmployeeName")),
grid.Column("EmployeeSal",header:"EmployeeSal"+ WebGrid2.Models.Helper.SortDirection (null,ref grid ,"EmployeeSal")),
grid.Column("EmpAge",header:"EmpAge"+ WebGrid2.Models.Helper.SortDirection (null,ref grid ,"EmpAge")),
grid.Column("EmployeeID",header :"Action", canSort: false, format: @<text> @Html.ActionLink("Edit","Edit",new {id = item.EmployeeID} ) |
@Html.ActionLink("Delete","Delete",new {id = item.EmployeeID} ) |
@Html.ActionLink("Details","Details",new {id = item.EmployeeID} ) |
)


)

)






























@*@model IEnumerable<webgrid2.models.employee>

@{
ViewBag.Title = "Index";
}

Index




@Html.ActionLink("Create New", "Create")


@foreach (var item in Model) {
}

@Html.DisplayNameFor(model => model.EmployeeName)
@Html.DisplayNameFor(model => model.EmployeeSal)
@Html.DisplayNameFor(model => model.EmpAge)
@Html.DisplayFor(modelItem => item.EmployeeName)
@Html.DisplayFor(modelItem => item.EmployeeSal)
@Html.DisplayFor(modelItem => item.EmpAge)
@Html.ActionLink("Edit", "Edit", new { id=item.EmployeeID }) |
@Html.ActionLink("Details", "Details", new { id=item.EmployeeID }) |
@Html.ActionLink("Delete", "Delete", new { id=item.EmployeeID })
*@
Member 10004269 20-Jun-19 14:16pm View    
realJSOP my project does not want to use jQuery , We are using Native bootstrap
Member 10004269 26-Feb-18 4:22am View    
Thank you Karthik
Member 10004269 11-May-17 3:34am View    
No I cant Change Existing Code structure

So i can give you another Explanation as follows

public class Zoo
{
public string zooName {get ; set;}

public List<animaldescriptions> animalDescriptions {get ; set;}
}

public class animalDescriptions

{
public string AnimalName {get ; set;}


}

Now we have List of Zoo as

List<zoo> ZooList = new List<zoo>();

var animaldescriptionsObj = new animalDescriptions { AnimalName = "Monkey"};
var animaldescriptionsObj2 = new animalDescriptions { AnimalName = "tiger"};


zoolist.add({ zooName = "Zoo1", List<animaldescriptions>{animaldescriptionsObj ,animaldescriptionsObj 2 }})

And we have other List of String as
List<string > lst = new List<string>();
lst.Add("Lion");
lst.Add("tiger");



Now i want linq Query so that AnimalNames defined in lst should not be selected from Zoolist ..so in result tiger animal name should be removed from Zoolist