These are my two classes
public class A
{
public string Nev { get; set; }
public List<B> Adatok = new List<B>();
public double Brutto { get; set; }
public double Ado { get; set; }
public double Netto { get; set; }
public int DolgozottNapokSzama { get; set; }
public int IgazolatlanNapokSzama { get; set; }
public string Datum { get; set; }
}
public class B
{
public string Beosztas { get; set; }
public double Oradij { get; set; }
public double Oraszam { get; set; }
public double PotlekoltOrak { get; set; }
public double PotlekmentesOrak { get; set; }
public int Unnepnap { get; set; }
public int Igazolatlan { get; set; }
public double BruttoMunakber { get; set; }
public double PotlekNormal { get; set; }
public double PotlekUnnep { get; set; }
public double Brutto { get; set; }
}
I need to view the nested List B from object A view table. I did the binding to the table
DataSource = Fields.Adatok
as I read on the forums, but it not working. I got the message:
,,The expression contains object "Adatok" that is not definied in the current context,, .
I would appreciate some more detailed answer. Thnx.
public class A
{
public string Nev { get; set; }
public List<B> Adatok = new List<B>();
public double Brutto { get; set; }
public double Ado { get; set; }
public double Netto { get; set; }
public int DolgozottNapokSzama { get; set; }
public int IgazolatlanNapokSzama { get; set; }
public string Datum { get; set; }
}
public class B
{
public string Beosztas { get; set; }
public double Oradij { get; set; }
public double Oraszam { get; set; }
public double PotlekoltOrak { get; set; }
public double PotlekmentesOrak { get; set; }
public int Unnepnap { get; set; }
public int Igazolatlan { get; set; }
public double BruttoMunakber { get; set; }
public double PotlekNormal { get; set; }
public double PotlekUnnep { get; set; }
public double Brutto { get; set; }
}
I need to view the nested List B from object A view table. I did the binding to the table
DataSource = Fields.Adatok
as I read on the forums, but it not working. I got the message:
,,The expression contains object "Adatok" that is not definied in the current context,, .
I would appreciate some more detailed answer. Thnx.