This is a migrated thread and some comments may be shown as answers.

Indenting Child Items from Parent in Self Referencing Grid

1 Answer 122 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ramasamy
Top achievements
Rank 1
Ramasamy asked on 06 Oct 2011, 08:53 AM

Hi,

I have used the below code to make the parent and child gird (self reference) column with as same.

this.binder = new ColumnWidthBinder(this.RadGridView1);

if (

 

 

dataControl.ParentOfType<RadGridView>() != null)
{
for(int i = 0; i < dataControl.Columns.Count; i++)
{
this.binder.RegisterColumn(dataControl.Columns[i], i);
}
}

all the column widths of parent and child coming correctly. the self reference hierarchy is also find but its like all left aligned. If I want to maintain the width as same and also the child items should indent from the parent (tree view hierarchy), what I have to do?

Any help appreciated?

Thanks,
Ramasamy

 

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 11 Oct 2011, 08:44 AM
Hello Ramasamy,

 You could define a childHierarchy DataTemplate for the child in the Resources section. Then for it you could specify margin/padding from the left.

I hope that this is what you are looking for.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Ramasamy
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or