Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9302943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:22:15+00:00 2026-06-18T23:22:15+00:00

Background: I have a DataGrid with multiple TextColumns. One column is read-only, and bound

  • 0

Background:

I have a DataGrid with multiple TextColumns. One column is read-only, and bound to the text of a TextBox that’s outside of the DataGrid. This TextBox is a multi-line textbox, meaning that AcceptsReturn = true and TextWrapping = Wrap.

Problem:

When a user enters multiple lines in the multi-line TextBox, the bound DataGridCell (and its row) vertically grow so all the text appears.

Questions:

  1. Is there a way to get a vertical scrollbar to appear within the cell, when multiple lines should appear?
  2. Generally, what are other techniques to circumvent the growth of a DataGridCell, and its row, due to multi-line content?

Research:

I know I can prevent a DataGridRow’s growth by forcibly setting its Height. However, that doesn’t trigger a scrollbar.

And I confirmed that WordWrap is off for the TextBlock within the DataGridCell.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T23:22:16+00:00Added an answer on June 18, 2026 at 11:22 pm

    I ended up being a bit flexible with my requirements and came up with this style:

    <Style
        TargetType="{x:Type DataGridCellsPresenter}"
        BasedOn="{StaticResource {x:Type DataGridCellsPresenter}}"
        >
        <Setter
            Property="MaxHeight"
            Value="25"
            />
    </Style>
    

    By setting MaxHeight on my DataGridCellsPresenters, I can trigger vertical scrollbars without directly interfering with row heights. And I can apply it consistently across my application, rather than per column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataGrid that needs to show a gradient background on mouseover of
Background: I have a DataGrid whose ItemSource is bound to an ObservableCollection<Dictionary<string, object>> type.
I have a dataGrid bound to a List object and this works fine by
Well, I have seen this code to do that: <DataGrid.RowStyle> <Style TargetType=DataGridRow> <Style.Triggers> <Trigger
BackGround: I have an advanced data grid. The data provider for this ADG is
Background I have a function that takes a config object as an argument. Within
Background: I have a WebPart that makes use of the SPCalendarView control and in
Background I have a dimension table that has a single record for each day.
Background: I have this with rollup query defined in MySQL: SELECT case TRIM(company) when
I have a datagrid and I added silverlight 4 toolkit contextmenu to textbox in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.