Home Forums WPF controls Xceed DataGrid for WPF Multiline TextBox in DataGrid

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

    Hello,

    how can I make multiline TextBox in DataGrid? When I press Enter, then it’s finnish editing and I can’t add new line in any TextBox. Thank’s

    Imported from legacy forums. Posted by julop (had 2462 views)

    User (Old forums)
    Member
    Post count: 23064

    You need to set AcceptsReturn=”True” for the TextBox in the Template. Something like this:-

    <xcdg:CellEditor x:Key=”noteEditor”>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <TextBox Text=”{xcdg:CellEditorBinding}” FocusVisualStyle=”{x:Null}” BorderThickness=”0″ Background=”Transparent”
    AcceptsReturn=”True” TextWrapping=”Wrap” SpellCheck.IsEnabled=”True” Margin=”0″ Padding=”0″ />
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    </xcdg:CellEditor>

    HTH
    Michael

    Imported from legacy forums. Posted by Michael (had 3348 views)

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