Hi,
I am trying to bind a list of the following complex type to a RadGridView
public interface IEntity
{
string FullClassName { get; set; }
.
.
.
.
List<Property> Properties { get; set; }
}
public class Property
{
public string Name { get; set; }
.
.
.
}
As you can see here that the IEntity interface contains a list of Property type, so for now I need to bind a list of IEntity to a radGrid and bind the inner list(Properties list) to a combo box cell.
Actually I did all the required steps to let the grid bind to the list, but the combo box is always displaying the type of the properties list (namespace.Peoperties…).
So I replaced the radGrid with a dataGrid and did the following
for (int i = 0; i < this.radGridEntities.Rows.Count; i++)
{
DataGridViewComboBoxCell dgcb = (DataGridViewComboBoxCell)this.radGridEntities [this.radGridEntities.Columns["Title"].Index,i];
dgcb.DataSource = ((IEntity)this.radGridEntities.Rows[i].DataBoundItem).Properties;
dgcb.DisplayMember = "Name";
}
As I show here, I loop over each row and set its data source, now, I need to retreive each cell to set it is data source while using RadGridView(as I am showing here while using windows dataGridView.
any idea would be appreciated
Thank you in advance
I am trying to bind a list of the following complex type to a RadGridView
public interface IEntity
{
string FullClassName { get; set; }
.
.
.
.
List<Property> Properties { get; set; }
}
public class Property
{
public string Name { get; set; }
.
.
.
}
As you can see here that the IEntity interface contains a list of Property type, so for now I need to bind a list of IEntity to a radGrid and bind the inner list(Properties list) to a combo box cell.
Actually I did all the required steps to let the grid bind to the list, but the combo box is always displaying the type of the properties list (namespace.Peoperties…).
So I replaced the radGrid with a dataGrid and did the following
for (int i = 0; i < this.radGridEntities.Rows.Count; i++)
{
DataGridViewComboBoxCell dgcb = (DataGridViewComboBoxCell)this.radGridEntities [this.radGridEntities.Columns["Title"].Index,i];
dgcb.DataSource = ((IEntity)this.radGridEntities.Rows[i].DataBoundItem).Properties;
dgcb.DisplayMember = "Name";
}
As I show here, I loop over each row and set its data source, now, I need to retreive each cell to set it is data source while using RadGridView(as I am showing here while using windows dataGridView.
any idea would be appreciated
Thank you in advance