Questions tagged [webgrid]

WebGrid is a view control built in to the ASP.NET Web Pages Framework. It displays a sortable, pageable HTML grid given a collection, and is customizable in various ways, making use of .NET 4.0's "dynamic" object type.

The ASP.NET Web Pages WebGrid provides a kind of quick-scaffolded functionality for displaying tabular information in ASP.NET Web Pages, or ASP.NET MVC when using the Web Pages (Razor) view engine. Given an IEnumerable data source, it is possible to construct a functional HTML data table, with sorting and paging, with a single line of code in the View (Razor syntax, for example):

@( new WebGrid(data).GetHtml() )

The control offers customization of various styling, sorting, and paging functionality; as well as the ability to define the column contents either as raw data, or as templated HTML.

822 questions
2
votes
0 answers

Webgrid: URL for Sorting and Filtering

I have a webgrid that is in a partialview. The parial view contains an ajax form which pass data to the webgrid. My view looks like using (Ajax.Begin("Gain", "Gaining", new AjaxOptions{UpdateTargetId="Res"})) { }
jpo
  • 3,959
  • 20
  • 59
  • 102
2
votes
0 answers

ASP.NET MVC3 WebGrid sorting with custom objects

I want to sort by column containing objects of my own type. Witch method should I override in my custom object (i.e. CompareTo, operator <) so the WebGrid can sort them automatically, Much like WebGrid sorts DateTime correctly. (I am using ASP.NET…
gyosifov
  • 3,193
  • 4
  • 25
  • 41
2
votes
3 answers

How do I get my WebGrid to POST instead of GET during a sort or paging operation in my MVC4 site?

I have a fairly simple site with a Search partial view and a Listing partial view. They're rolled up using multiple models into the Index view. Everything is fine. Except when I click the grid column headers to sort or attempt to page to the next…
IAmAN00B
  • 1,913
  • 6
  • 27
  • 38
2
votes
1 answer

Update WebGrid and DropDown through Ajax in MVC 4

I am very new to MVC and have just come across a scenario that I need some help with.I am creating a website in ASP.NET, C#.NET Using MVC 4. So as per my requirement I have two DropDowns which is