asked on 17 Mar 2022, 09:13 AM
| edited on 22 Mar 2022, 10:19 AM
Is there a way to horizontally align a child GridViewTemplate so that the (BestFitColumns) columns are not on the left but equally distant from left and right, so Center?
1 Answer, 1 is accepted
Dinko | Tech Support Engineer
answered on 21 Mar 2022, 02:05 PM
Thank you for writing.
In order to indent the child grid, it is necessary to apply Margin to the GridDetailViewCellElement in the ViewCellFormatting event:
privatevoidradGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
GridDetailViewCellElement detailCell = e.CellElement as GridDetailViewCellElement;
if (detailCell != null)
detailCell.Margin = new Padding(50, 0, 0, 0);
Give this approach a try and let me know if it works for you. If not may I ask you to share an image of the desired behavior? This way I could better understand it and think of a suitable solution.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.