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

Hierarchical Indent

3 Answers 124 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 2
Iron
Iron
Iron
Dave asked on 28 Jul 2020, 04:32 AM

Is there a property to increase the indent of each level of the child groups?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Jul 2020, 04:59 AM

Hello, David,

VirtualGridTableElement offers the IndentColumnWidth property which is expected to control the width of the indent column.

I believe that this is the property you are looking for.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

0
Dave
Top achievements
Rank 2
Iron
Iron
Iron
answered on 28 Jul 2020, 02:58 PM

Hi Dess,

The IndentColumnWidth property sets the first column's width - the VirtualGridExpanderItem.  It does not indent the RowContainer.

 

((Telerik.WinControls.UI.VirtualGridTableElement)(this.radVirtualGrid1.GetChildAt(0).GetChildAt(0))).IndentColumnWidth = 60;

 

I've also tried setting the various Margin and the half dozen Border properties without success.

Attached is an altered image of what I'm asking:

 

0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Jul 2020, 10:50 AM

Hello, David,

The provided screenshot is greatly appreciated.

In order to achieve a similar design, it is necessary to subscribe to the RowFormatting event and apply left margin for the VirtualGridDetailViewCellElement that hosts the child level: 

        private void radVirtualGrid1_RowFormatting(object sender, VirtualGridRowElementEventArgs e)
        {
            if (e.RowElement.DetailsElement != null)
            {
                e.RowElement.DetailsElement.Margin = new Padding(50, 0, 0, 0);
            } 
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Tags
VirtualGrid
Asked by
Dave
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Dave
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or