I am facing problem with Heirachichal data grid view.
i went thorug the online sample. for bounded and unbouded grid views
with the unbounded grid
------------------------------------
i am facing problem for adding the chilld templte rows
GridViewTemplate template = radGridView1.MasterGridViewTemplate.ChildGridViewTemplates[0];
template.Rows.Add()
template.Rows.Add() functionality is not supporting. :(
with the bouded grid
--------------------------------
below given is the source code used for bouded grid
DataSet
ds = new DataSet ();
ds.ReadXml(
@"Parent.xml");
DataTable Parent = ds.Tables[0];
ds =
new DataSet();
ds.ReadXml(
@"Child.xml");
DataTable Child = ds.Tables[0];
radGridView1.AutoGenerateHierarchyFromDataSet =
true;
radGridView1.MasterGridViewTemplate.AllowAddNewRow =
true;
radGridView1.MasterGridViewTemplate.DataSource = Parent;
//setup the child template
GridViewTemplate template = new GridViewTemplate();
template.AllowAddNewRow =
true;
template.DataSource = Child;
//create the relation
GridViewRelation relation = new GridViewRelation(radGridView1.MasterGridViewTemplate);
relation.ChildTemplate = template;
relation.RelationName =
"ModuleID";
relation.ParentColumnNames.Add(
"ModuleID");
relation.ChildColumnNames.Add(
"ModuleID");
radGridView1.Relations.Add(relation);
// Adding child template to Main Grid
radGridView1.MasterGridViewTemplate.ChildGridViewTemplates.Add(template);
radGridView1.AutoGenerateHierarchyFromDataSet =
true;
Sample Data in Parent Table.
----------------------------------------
<
Table>
<ModuleID>1</ModuleID>
<
ModuleName>Organisation</ModuleName>
<
ArbModuleName>arbOrganisation</ArbModuleName>
</
Table>
Sample Data in child Table
----------------------------------
<
Table>
<
ModuleID>1</ModuleID>
<
FormID>2</FormID>
<
FormName>frmCountry</FormName>
<
FormDescription>Country Details</FormDescription>
<
FormArbDescription>Arb Country Details</FormArbDescription>
</
Table>
The grid is displaying only the parent table data.
I didnt changed any property of the grid except in the above code
please give me a solution.
Thanking you
Sabindas K S