or
oCombobox =
CType
((
CType
(e.ActiveEditor, RadDropDownListEditor)).EditorElement, RadDropDownListEditorElement)
oCombobox.Items.Add(
New
RadListDataItem(
"Boolean"
,
GetType
(
Boolean
).ToString))
oCombobox.Items.Add(
New
RadListDataItem(
"Date"
,
GetType
(DateTime).ToString))
oCombobox.Items.Add(
New
RadListDataItem(
"Numeric"
,
GetType
(
Double
).ToString))
oCombobox.Items.Add(
New
RadListDataItem(
"Text"
,
GetType
(
String
).ToString))
public class test
{
public string name { get; set; }
public BindingList<childs
> childlist { get; set; }
}
public class childs
{
public string childname { get; set; }
}
private void form_Load(object sender, EventArgs e)
{
BindingList<
test
> testlist = new BindingList<
test
>();
/** I populate my list with data. I wont show this here. After the list is populated: **//
this.raggrid.MasterTemplate.Columns.Clear();
this.raggrid.MasterTemplate.AutoGenerateColumns = true;
this.raggrid.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
this.raggrid.MasterTemplate.Columns.Add(new GridViewTextBoxColumn("name", "name"));
GridViewTemplate template = new GridViewTemplate();
this.raggrid.Templates.Add(template);
template.Columns.Add(new GridViewTextBoxColumn("name", "childname"));
template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
GridViewRelation relation = new GridViewRelation(this.raggrid.MasterTemplate, template);
relation.ChildColumnNames.Add("childlist");
this.raggrid.Relations.Add(relation);
this.raggrid.DataSource = testlist;
}