MVC5 - What is the correct way to work with MVC in the case of data return from a grid?

Asked

Viewed 53 times

2

I have a model with 4 fields that after a filter displays a grid with X records on the same page (VIEW).

I would like to know the best way to return the "grid" data in question to the controller?

Simplified example (Model):

    namespace WebApplication1.Models 
    {
        public class modeloTST
        {
            [Display(Name = "Informe a Nome:")]     
            public string Nome { get; set; }     //filtro

            public List<classeTST> lstITENS{ get; set;}  //exibicao em grid
        }
    }
  • It depends a lot on what you want to do. If it is only to display the list data in the View, you can make a typed View and perform a repeat loop on Razor.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.