Home Forums WinForms controls Xceed Grid for WinForms How to control indent of detail grid from master

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16442 |

    I have a master grid with 2 detail grids below it.  I need to control the indent of the 2nd detail grid (indent it more then the first detail grid or right align it with first detail grid).  I’ve tried (detailgrid is  2nd detail grid)

    detailgrid.SideMargin.HorizontalAlignment = Xceed.Grid.

    HorizontalAlignment.Right;

     but that didn’t do anything.

     Any ideas?

     Thanks,

    Bernie

    Imported from legacy forums. Posted by Bernard (had 566 views)

    User (Old forums)
    Member
    Post count: 23064

    The HorizontalAlignment is for the content of the element, not for the element itself.

    This being said, you can increase the width of the margin, which will indent the DetailGrid. Note however that the TreeLine will not be aligned anymore, so you would have to hide it ( DataRowTemplate.ShowTreeLine = false).

    I don’t know your scenario, but another solution would be to nest the second DetailGrid to the first one, instead of adding it to the master grid.  This way the indent and the TreeLine would all be fine. 

    e.g. detailGridTemplate1.DetailGridTemplates.Add( new DetailGrid() ).

    Imported from legacy forums. Posted by André (had 976 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.