I have a grid which incorporates Text columns, that I allow to user to edit. I use a Word Wrap for the TextBox, but the box in many (but not all) situations, overlaps the row itself, as shown in the attached Screen grab.
The XAML for the grid is as follows:
<
tg:RadDataGrid
x:Name
=
"PaymentsGrid"
RelativePanel.Below
=
"spFinanceSummary1"
IsEnabled
=
"{x:Bind ViewModel.IsGrantEditingAllowed, Mode=TwoWay}"
AutoGenerateColumns
=
"False"
IsSynchronizedWithCurrentItem
=
"True"
UserEditMode
=
"Inline"
Height
=
"250"
ColumnDataOperationsMode
=
"Inline"
VerticalContentAlignment
=
"Center"
ItemsSource
=
"{x:Bind ViewModel.OcPayments}"
ScrollViewer.IsVerticalRailEnabled
=
"True"
extensions:ScrollViewerEx.VerticalScrollBarMargin
=
"-20"
Margin
=
"0,20,0,0"
>
<
tg:RadDataGrid.Columns
>
<
tg:DataGridTextColumn
PropertyName
=
"PayeeDetails"
Header
=
"Payee details"
SizeMode
=
"Fixed"
Width
=
"250"
CanUserEdit
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsFinanceEditingAllowed}"
>
<
tg:DataGridTextColumn.CellContentStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Margin"
Value
=
"5,5,5,5"
/>
<
Setter
Property
=
"TextWrapping"
Value
=
"Wrap"
/>
</
Style
>
</
tg:DataGridTextColumn.CellContentStyle
>
<
tg:DataGridTextColumn.CellEditorStyle
>
<
Style
TargetType
=
"TextBox"
>
<
Setter
Property
=
"Margin"
Value
=
"5,5,5,5"
/>
<
Setter
Property
=
"Width"
Value
=
"240"
/>
<
Setter
Property
=
"TextWrapping"
Value
=
"Wrap"
/>
</
Style
>
</
tg:DataGridTextColumn.CellEditorStyle
>
</
tg:DataGridTextColumn
>
<
tg:DataGridNumericalColumn
PropertyName
=
"Payment"
Header
=
"Amount"
CellContentStyle
=
"{StaticResource DefaultGridNumericStyle}"
CellContentFormat
=
"{}{0,0:C2}"
SizeMode
=
"Auto"
tcp:CultureService.CultureName
=
"en-GB"
CanUserEdit
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsFinanceEditingAllowed}"
>
<
tg:DataGridNumericalColumn.CellEditorStyle
>
<
Style
TargetType
=
"tci:RadNumericBox"
>
<
Setter
Property
=
"Margin"
Value
=
"5,5,5,5"
/>
<
Setter
Property
=
"Maximum"
Value
=
"9999999999"
/>
<
Setter
Property
=
"ValueFormat"
Value
=
"{}{0,0:C2}"
/>
<
Setter
Property
=
"AllowNullValue"
Value
=
"False"
/>
<
Setter
Property
=
"ButtonsVisibility"
Value
=
"Collapsed"
/>
</
Style
>
</
tg:DataGridNumericalColumn.CellEditorStyle
>
</
tg:DataGridNumericalColumn
>
<
tg:DataGridDateColumn
PropertyName
=
"PaymentDate"
Header
=
"Date"
CellContentFormat
=
"{}{0,0:dd/MM/yyyy}"
Width
=
"170"
SizeMode
=
"Fixed"
CanUserEdit
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsFinanceEditingAllowed}"
>
<
tg:DataGridDateColumn.CellEditorStyle
>
<
Style
TargetType
=
"tci:RadDatePicker"
>
<
Setter
Property
=
"Margin"
Value
=
"5,5,5,5"
/>
<
Setter
Property
=
"Width"
Value
=
"150"
/>
<
Setter
Property
=
"SelectorOrder"
Value
=
"dmy"
/>
</
Style
>
</
tg:DataGridDateColumn.CellEditorStyle
>
</
tg:DataGridDateColumn
>
<
tg:DataGridTextColumn
PropertyName
=
"cStatus"
CanUserEdit
=
"False"
Header
=
"Status"
SizeMode
=
"Auto"
IsVisible
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsPaymentBeingViewed}"
/>
<
tg:DataGridComboBoxColumn
PropertyName
=
"Status"
Header
=
"Status"
ItemsSource
=
"{x:Bind ViewModel.OcPaymentStatus}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"Code"
SizeMode
=
"Auto"
CanUserEdit
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsFinanceEditingAllowed}"
IsVisible
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsPaymentBeingEdited}"
/>
<
tg:DataGridTextColumn
PropertyName
=
"cMethod"
CanUserEdit
=
"False"
Header
=
"Method"
SizeMode
=
"Auto"
IsVisible
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsPaymentBeingViewed}"
/>
<
tg:DataGridComboBoxColumn
PropertyName
=
"Method"
Header
=
"Method"
ItemsSource
=
"{x:Bind ViewModel.OcPaymentMethods}"
DisplayMemberPath
=
"Description"
SelectedValuePath
=
"Code"
SizeMode
=
"Auto"
CanUserEdit
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsFinanceEditingAllowed}"
IsVisible
=
"{x:Bind Mode=TwoWay, Path=ViewModel.IsPaymentBeingEdited}"
/>
<
tg:DataGridBooleanColumn
PropertyName
=
"Requested"
Header
=
"Requested"
SizeMode
=
"Auto"
>
<
tg:DataGridBooleanColumn.CellEditorStyle
>
<
Style
TargetType
=
"CheckBox"
>
<
Setter
Property
=
"Margin"
Value
=
"48,5,0,5"
/>
<
Setter
Property
=
"MinWidth"
Value
=
"0"
/>
</
Style
>
</
tg:DataGridBooleanColumn.CellEditorStyle
>
</
tg:DataGridBooleanColumn
>
<
tg:DataGridBooleanColumn
PropertyName
=
"ReceiptReceived"
Header
=
"Receipt received"
SizeMode
=
"Auto"
>
<
tg:DataGridBooleanColumn.CellEditorStyle
>
<
Style
TargetType
=
"CheckBox"
>
<
Setter
Property
=
"Margin"
Value
=
"70,5,0,5"
/>
<
Setter
Property
=
"MinWidth"
Value
=
"0"
/>
</
Style
>
</
tg:DataGridBooleanColumn.CellEditorStyle
>
</
tg:DataGridBooleanColumn
>
<
tg:DataGridTextColumn
PropertyName
=
"ReasonCancelled"
Header
=
"Notes"
SizeMode
=
"Fixed"
Width
=
"250"
>
<
tg:DataGridTextColumn.CellContentStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Margin"
Value
=
"5,5,5,5"
/>
<
Setter
Property
=
"TextWrapping"
Value
=
"Wrap"
/>
</
Style
>
</
tg:DataGridTextColumn.CellContentStyle
>
<
tg:DataGridTextColumn.CellEditorStyle
>
<
Style
TargetType
=
"TextBox"
>
<
Setter
Property
=
"Margin"
Value
=
"5,5,5,5"
/>
<
Setter
Property
=
"Width"
Value
=
"240"
/>
</
Style
>
</
tg:DataGridTextColumn.CellEditorStyle
>
</
tg:DataGridTextColumn
>
</
tg:RadDataGrid.Columns
>
<
tg:RadDataGrid.Commands
>
<
gridCommands:DataGridUserCommand
Id
=
"CellTap"
Command
=
"{x:Bind Path=PaymentCellTap}"
/>
<
gridCommands:DataGridUserCommand
Id
=
"BeginEdit"
Command
=
"{x:Bind Path=PaymentBeginEdit}"
/>
<
gridCommands:DataGridUserCommand
Id
=
"CommitEdit"
Command
=
"{x:Bind Path=PaymentCommitEdit}"
/>
<
gridCommands:DataGridUserCommand
Id
=
"CancelEdit"
Command
=
"{x:Bind Path=PaymentCancelEdit}"
/>
</
tg:RadDataGrid.Commands
>
</
tg:RadDataGrid
>