I am trying to compact the data presented by xamdatagrid. I have gotten the field labels smaller but cannot get rid of the vertical spacing between the cells when using multiple rows and the spacing between the.labels.
This is a re-post, the previous discussion was 'dropped'.
I have tried these styles:
<igDP:XamDataGrid.Resources> <Style TargetType="{x:Type igDP:LabelPresenter}" > <Setter Property="Padding" Value="2,0,2,0" /> <Setter Property="Margin" Value="2,0,2,0" /> </Style> <Style TargetType="{x:Type igDP:HeaderPresenter}" > <Setter Property="Padding" Value="2,0,2,0" /> <Setter Property="Margin" Value="2,0,2,0" /> </Style> <Style TargetType="{x:Type igEditors:XamNumericEditor}"> <Setter Property="Padding" Value="0"/> <Setter Property="Margin" Value="0"/> </Style> <Style TargetType="{x:Type igEditors:XamTextEditor}"> <Setter Property="Padding" Value="0"/> <Setter Property="Margin" Value="0"/> </Style> <Style TargetType="{x:Type igEditors:XamMaskedEditor}"> <Setter Property="Padding" Value="0"/> <Setter Property="Margin" Value="0"/> </Style> <Style TargetType="{x:Type igEditors:XamCurrencyEditor}"> <Setter Property="Padding" Value="0"/> <Setter Property="Margin" Value="0"/> </Style> <Style TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Padding" Value="0"/> <Setter Property="Margin" Value="0"/> </Style> <Style TargetType="{x:Type igDP:DataRecordCellArea}"> <Setter Property="Padding" Value="0"/> <Setter Property="Margin" Value="0"/> </Style> </igDP:XamDataGrid.Resources>
Attached is a jpg of the window...
Any ideas would be GREATLY appreciated!
Hi,
The styles you provided seems to work fine in my sample application so I suppose you are setting some aditional properties of the fields. Could you provide sample project or some code snippets on the grid so I can look into it? If you are setting Row and Column properties of each field make sure the values are correct e.g. the MPlan field should be placed on Row=0, Column=0 and the Emp field on Row=1, Column=0. You can also double check if you are setting one of the CellMinHeight or RCellMaxHeight properties in the settings.
-Vlad
Thanks for replying, I have managed to tighten up the data cells (missed the style for checkboxes) but cannot tighten up the fields when they are stacked. I have attached zip with a jpg of the area I am concerned about and a xmal and xaml.cs. Just drag the fields to stack them (in my real apps I save and load settings).
Thanks