public class FinalClass { public Employee emp{ get; set; }
public Customer cust{ get; set; } }
how to bind List<FinalClass> into a Gridview is it possible or should i have to create a separate class with corresponding fields as its properties?
Please help me out.
I will assume based on how the question is phrased that you already know the basics of how databinding works. Within your GridView you can use something like
<%# Eval("Employee.Name") %>If you specifically want to know about 2-way databinding then in my opinion it would be easier to create a View-Model, what you refer to as “a separate class with corresponding fields as its properties”