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 7787771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:46:35+00:00 2026-06-01T20:46:35+00:00

I am working on implementing the re-sizing feature in WPF DataGrid, it supports re-sizing

  • 0

I am working on implementing the re-sizing feature in WPF DataGrid, it supports re-sizing through column/row headers but what I want is to allow re-sizing on grid lines.

So, user can re-size rows/columns from anywhere in DataGrid. I have been able to implement the functionality and it works fine for columns but in case of rows its messed up.

You can re-size a row through header and you can also re-size through any cell of that row but problem occurs if you use them together i.e once you have re sized a row through a cell, re-sizing through row header would stop working(shows weird behavior). Here is how it looks like (notice the broken grid lines…) –

enter image description here

I have created a sample to reproduce this behavior –

WPF Toolkit DataGrid Sample – Adding GridLines Resizing

To reproduce the problem

  1. Re-size a row through grid-lines(any cell) and then

  2. Re-size the same row through row header.

will appreciate any kind of help.

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-01T20:46:36+00:00Added an answer on June 1, 2026 at 8:46 pm

    I solved the problem by setting the height of CellPresenter instead of Row. Here is the main code block –

    double newHeight = cellsPresenter.ActualHeight + e.VerticalChange;     
    DataGridRowHeader rowHeader = GetFirstVisualChild<DataGridRowHeader>(row);    
    if (rowHeader != null)    
    { 
        // clamp the CellsPresenter size to the MaxHeight of Row, 
        // because row wouldn't grow any larger
        double maxHeight = row.MaxHeight;
        if (newHeight > maxHeight)
        {
            newHeight = maxHeight;
        }
    }
    
    cellsPresenter.Height = newHeight;
    
    // Updating row's height doesn't work correctly; shows weird behavior    
    // row.Height = newHeight >= 0 ? newHeight : 0;
    

    I have blogged about this in detail here –

    WPF DataGrid Customization: Resizing Row/Column through DataGridCell gridlines

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

Sidebar

Related Questions

I'm working on implementing a way to allow HTML in a field that I
I am working on implementing a new payment module for Magento and want to
I am working on implementing Zend Framework within an existing project that has a
I'm currently working on implementing a fulltext search engine for one of our sites,
I'm working on implementing a reasonably simple XML serializer/deserializer (log file parser) application in
I'm working on implementing a log based file system for a file as a
I am working on implementing Zend Framework within an existing project that has 2
I'm working on implementing a game server on AppHarbor for a tournament style game.
A little backstory, currently I'm working on implementing a triangle rendering system in Expression2
So I have been working on properly implementing a quicksort algorithm for a homework

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.