I have made my very first simple MVC 4 application . And populating the view in the form of a table.
I am now struggling with filtering the table. I googled a lot, and there are tons of useful links, But they all storing the angular controller array as hardcoded values. But, how do i store the values from my model..
Can you please help..?
$scope.items = [ {ISBN:"5674789", Name: "Asp.Net MVC", Price: 560, Quantity: 20}, {ISBN:"4352134",Name: "AngularJS", Price: 450, Quantity: 25}, {ISBN:"2460932",Name: "Javascript", Price: 180, Quantity: 15} ];
Below is my table which I want to filter as I start typing in the search box,.
@model IEnumerable
@{
ViewBag.Title = "Browse Tasks";
}
@using System.Web.Optimization
All Task List
@Html.DisplayNameFor(model => model.task_id) | @Html.DisplayNameFor(model => model.task_desc) | @Html.DisplayNameFor(model => model.task_type) | @Html.DisplayNameFor(model => model.Priority) | @Html.DisplayNameFor(model => model.Task_status) | @Html.DisplayNameFor(model => model.Requester) | @Html.DisplayNameFor(model => model.RequestDate) | @Html.DisplayNameFor(model => model.busowner) | @Html.DisplayNameFor(model => model.devowner) | @Html.DisplayNameFor(model => model.StartDate) | @Html.DisplayNameFor(model => model.est_effort) | @Html.DisplayNameFor(model => model.Complete_date) | @Html.DisplayNameFor(model => model.act_effort) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
@Html.DisplayFor(modelItem => item.task_id) | @Html.DisplayFor(modelItem => item.task_desc) | @Html.DisplayFor(modelItem => item.task_type) | @Html.DisplayFor(modelItem => item.Priority) | @Html.DisplayFor(modelItem => item.Task_status) | @Html.DisplayFor(modelItem => item.Requester) | @Html.DisplayFor(modelItem => item.RequestDate) | @Html.DisplayFor(modelItem => item.busowner) | @Html.DisplayFor(modelItem => item.devowner) | @Html.DisplayFor(modelItem => item.StartDate) | @Html.DisplayFor(modelItem => item.est_effort) | @Html.DisplayFor(modelItem => item.Complete_date) | @Html.DisplayFor(modelItem => item.act_effort) |
Neuronring RPosted Apr 20, 2015, 10:35 AM
Neuronring RPosted Apr 19, 2015, 4:39 PM
Santhakumar MunuswamyPosted Apr 19, 2015, 4:22 PM
Refer this below link
http://rohit-developer.blogspot.in/2015/01/sorting-paging-and-filter-grid-using.html
http://www.codeproject.com/Articles/892301/Server-side-Data-Filtering-Sorting-and-Paging-with