mvccontrib-grid

MvcConrib Grid's Sortable property don't seems to to do any effect

I need a way to generate the header texts in the grid as sortalbe link. Do I need to use custom renderer to get this behavior? ...

Can footers be added to MVCContrib grids?

I'd like for my column header to also be footers using MVCContrib grid. How can I add footers? <% Html.Grid(Model).Columns(col => { col.For(c => c.sub_id).Named("Id"); col.For(c => c.name).Named("Name"); col.For(c => c.group).Named("Group"); col.For(c => c.insurance_GL).Named("Insurance").Format("{0:d}"); }).Attributes(id => "list").Re...

MvcContrib Grid - AutoGenerateColumns possible with complex objects?

I like MvcContrib Grid's AutoGenerateColumns feature, however it only seems to work with simple objects. Is it possible to get it to traverse the properties of a complex object? Or is it neccesary to do this manually with column.For()? An example would be a User object that has an Address object as one of its properties. ...

MvcContrib Grid and Display/Edit Templates

Has anyone come across a good solution for using ./Views/Shared/DisplayTemplates and ./Views/Shared/EditTemplates with the MvcContrib.UI Grid? I guess I could wireup a CustomItemRenderer, but I would much rather be able to do something like: <% Html.Grid<Person>(Model.People) .Sort(new GridSortOptions {Column = Model.Column, D...

Format boolean column in MVCContrib grid

HI, I am using the MVCContrib grid and I would like to display images depending on the values of a column, e.g.: if the column's value is null display the image "<img src="true.gif">" otherwise display the image "<img src="false.gif"> Furthermore I would also need (this should be the same approeach I think) to display different acti...

Auto generate grid using mvccontrib by passing datatable in ASP.net MVC 2 application

Hi, In My project i want to use the mvccontrib (http://mvccontrib.codeplex.com) to auto generate grid by passing the DataTable to the Grid. Currently Grid does not support this. Grid takes IEnumerable(Of T) and auto generate columns. Is their any way i can achieve this by passing DataTable. Or How do i convert the DataTable to IEnumera...

Html.Grid DisplayFormat data annotation does not work

Hi, I am trying to bind my view model to the Html.Grid. I have set the DisplayFormat annotation to one of my property. However, the format is not applied when the grid is rendered. Here's the code: In view model: [DisplayFormat(DataFormatString = "{0,10:###,0}")] public double AmountCurrency { get; set; } On aspx: <%= Html.Gr...

Html.Grid containing checkbox per row

Hi, I am using Html.Grid in my asp.net MVC2 application. The grid contains checkboxes per row. <%= Html.Grid<MyViewModel>(Model.MyList) .Columns( column => { column.For(x => Html.CheckBox("Select", false, new { id = x.ID })).DoNotEncode(); I need to loop through the checked records and action them. How can I ret...

mvc contrib grid - pager

Hi, I am using the mvc contrib grid and generate the pager like this: <%= Html.Pager((IPagination)Model) %> This produces something like this: Showing 11 - 20 of 200 first | prev | next | last Is there a simple way to produce something like this which shows 'neighboring pages': Showing 11 - 20 of 200 first | prev | 1 2 3 4 ... | n...

Viewmodel to allow sorting and filtering for mvc contrib grid

In my attempt to enable sorting and filtering in conjunction with the MVC contrib. grid I have decided to use a Viewmodel which contains the grid data plus the sorting and filtering information. I added a form under the grid and the Viewmodel is used to maintain the state of the form and to carry the data for the grid: public class Gri...

Passing A Lambda into a method with MVCContrib

I have a method in my class that takes a bool and returns a string so that the user doesn't see true or false in the view. I am then trying to use this method in the MVCcontrib grid public string BidStatusText(bool status) { if (status == true) return "Bid Confirmed"; else if (status == false) ...

MVCContrib grid - sorting a custom column

Hello, Just started learning to use the grid so please excuse me for the possibly trivial question. How can I sort by a column that uses another table property? For ex. column.For(cust => cust.LinkedTable.someProperty).Sortable(true); definition results in a "Could not find a property called 'someProperty' on type MyProject.Models.Node...

MVCContrib Grid - how to add and delete rows with ajax ?

Hello, I'm wondering what's the best strategy to delete a row in MVCContrib generated grid. Consider this grid: Html.Grid(Model.Proc.Documents).Columns(column => { column.For(c => c.Name).Named("Title"); column.For(c => c.Author.Name).Named("Author"); column.For("Action").Action( delegate(DocumentDto doc) ...

Strange problem Ajax enabled MVCContrib Grid pager

Hello, Let's explain the context: I have a person form inside a jquery dialog that has some tabs to group informations related to this person (Personal data, addresses, emails, position, etc.) One of the tab show the Person addresses through an ajax call to this controller action [HttpGet] public ActionResult GetAddresses( int id, int...

Overriding the default 'No Data' Message in MVCContrib Grid

Is it possible to override the default 'There is no Data available' message in MVCContrib Grid with a custom message? ...

Help with MvcContrib Column options

Hi, I am using the MVCContrib grid and I would like to add some html attributes to a cell depending on the value of a column. I need something like this column.For(c => c.Type.Equals("Type A") ? "show value and add attribute" : "just show value"); I tried this but it doesn't work. It shows the value on the grid as - class="Type...