I have a XamDataGrid which is displaying 2 columns of text. When not in edit mode the text display correctly. However, when entering edit mode by double clicking the cell the cell enters edit mode but the bottom half of the text appears cut off (see attached screenshots).
I am using the Metro theme and the XAML is as follows:
<igWPF:XamDataGrid DataSource="{Binding Path=., Mode=TwoWay}" Background="Transparent" GroupByAreaLocation="None"> <igWPF:XamDataGrid.FieldSettings><igWPF:FieldSettings AllowEdit="True" CellClickAction="SelectRecord" AllowRecordFiltering="True" FilterOperatorDefaultValue="Contains"/> </igWPF:XamDataGrid.FieldSettings><igWPF:XamDataGrid.FieldLayouts><igWPF:FieldLayout><igWPF:FieldLayout.Settings><igWPF:FieldLayoutSettings AllowDelete="True" AutoGenerateFields="False" RecordSelectorLocation="None" LabelLocation="Default" SelectionTypeRecord="Extended" FilterUIType="Default"/><igWPF:UnboundField Binding="{Binding Path=Title, Mode=TwoWay}" Label="Title" Width="*" IsScrollTipField="True"/><igWPF:UnboundField Binding="{Binding Path=Description, Mode=TwoWay}" Label="Description" Width="*"/> </igWPF:FieldLayout></igWPF:XamDataGrid.FieldLayouts></igWPF:XamDataGrid>
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I have been looking into your sample and I modified it, so now it works as you want. Basically I added Style for the XamTextEditor in the XamDataGrid’s Resources and set its Padding to 0 when in edit mode, using Trigger. Also I can say that you have different Editors in the XamDataGrid, like XamNumericEditor, XamDateTimeEditor, etc. you should add similar Styles for them, too. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Many thanks that is exactly what I was after.
However, I seem to have mixed up my 2 forum posts. This solution actually relates to http://ko.infragistics.com/community/forums/p/83758/418567.aspx#418567
My original question in this thread was regarding text being cut off in edit mode. Looking at the example we have been discussing I can see the edit mode is working correctly. However, when I add the Mahapps.Metro library to the project the cut off text issue re-appears. See attached project.
I realise that a conflict with a 3rd party library is outside your control but is there a way I can override the cell styling to eliminate this issue?
I have modified the sample further, so now the HeaderPrefixArea looks like you want. Basically I created a Style for the DataRecordPresenter and added EventSetter for its Loaded event. In the handler I check if it is HeaderRecord and if it is, I get a Border from its Template in order to set its BorderThickness and BorderBrush as you want. Please let me know if this helps you or you need further assistance on this matter.
Hi,
Many thanks for your response. The example project you sent me does not reproduce the issue because it did not specify multiple field layouts. I have modified the example to demonstrate the behaviour I am experiencing. You will see that the left most column header only has a border on the top, bottom and right of the cell but not the left. See my original screenshot for an example.