Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
MVC: Passing model from view to controller on saving IGGrid
posted

Hello Infragistics community, 

I have made a little sample project to illustrate my problem. This is how the page looks like. 

View

My model that I pass to the View is the class Company. 

public class Company
{
     public int ID { get; set; }
     public string CompanyName { get; set; }
     public string Address { get; set; }
     public IQueryable<Employee> EmployeeList { get; set; }
}

And the Employee Class: 

public class Employee
{
      public int ID { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
}

This is how my controller looks like (w/out the jquery script part...)=> 

Controller

and my View looks like this. 

View

I need to save the data from the company and from the employee table after clicking the "save" button. This has to be executed on one button click, since im doing some complex validations. I have no issuse saving the employee table, but i have problems saving the company attributes ( company name & company address). 

Thank you very much

Parents Reply Children
No Data