Добрый день! У меня возникла проблема такого плана:
Имеются бизнес объекты:
public class TMC_Details
{
private int id;
public int ID
{
get
{
return this.id;
}
set
{
this.id = value;
}
}
private string nn;
public string NN
{
get
{
return this.nn;
}
set
{
this.nn = value;
}
}
private int group_id;
public int Group_ID
{
get
{
return this.group_id;
}
set
{
this.group_id = value;
}
}
private string name;
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
public TMC_Details()
{
}
public TMC_Details(int id, string nn, int group_id, string name)
{
this.ID = id;
this.NN = nn;
this.Group_ID = group_id;
this.Name = name;
}
}
и
public class TMC_DB
{
private TMC_DSTableAdapters.TMCTableAdapter ta = new TMC_DSTableAdapters.TMCTableAdapter();
public TMC_DB()
{
}
public TMC_DS.TMCDataTable GetByParametrs(string nn, Nullable<int> group_id, string name)
{
return this.ta.GetByParametrs(nn, group_id, name);
}
}
На форму кидаю dataGridView, BindingSource.
У dataGridView в качестве DataSource выбираю BindingSource.
У BindingSource в качестве DataSource выбираю TMC_DB. Не понимаю почему список datamember у BindingSource пуст

В дизайнере получаю следующие строчки кода:
...
this.components = new System.ComponentModel.Container();
....
this.TMCDBBindingSource = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.dgvTMC)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TMCDBBindingSource)).BeginInit();
....
this.dgvEdIzm.DataSource = this.TMCDBBindingSource;
....
Объясните пожалуйста что ещё необходимо сделать для получения данных из бизнес объекта в dataGridView?
11.06.07 23:18: Перенесено модератором из '.NET' — AndrewVK