We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to catch row/column resize ?

Thread ID:





88811 Aug 12,2009 03:34 PM UTC Aug 19,2009 11:48 AM UTC WPF 5
Tags: GridControl
Asked On August 12, 2009 03:34 PM UTC


In an Essential Grid,
the total width of all the columns is independent from the width of the grid itself. It can be smaller or larger.

It's the same for the total height of all the rows.

I am resizing row/column sizes using frozen rows/columns. I need to catch the row/column resize event in order to adjust the general size of the grid to the total size of all columns.


private void MyGridRowResize() // Event called when a row is resized
MyGrid.Height = TotalHeightOfAllTheRows;

How can I accomplish this ?

Thanks in advance


Clay Burch [Syncfusion]
Replied On August 13, 2009 02:47 PM UTC

If I understand what you are asking, I think you can use the GridControl.Model.ColumnWidths.LineSizeChanged event (& RowHeights.LineSizedChanged event) to adjust the grid's width and height as your user changes a column width or row height. Here is a little sample.


Replied On August 14, 2009 08:28 AM UTC

This is almost exactly what I wanted with a little problem:

'LineSizeChanged' fires only when the mouse button is released, not before. So the user can't see the grid changing size while dragging.

What I need is something like :

I need to adjust the grid general size as the user is moving his mouse to change the row/column size.

Clay Burch [Syncfusion]
Replied On August 14, 2009 12:51 PM UTC

If you only want to catch the action of your user changing rowheights/columnwidths through the UI, then you can use this event instead of the LineSized event.

gridControl1.ResizingRows += new GridResizingRowsEventHandler(gridControl1_ResizingRows);

void gridControl1_ResizingRows(object sender, GridResizingRowsEventArgs args)
if (args.Reason == GridResizeCellsReason.MouseMove)

There is also a ResizingColumns even that you can use for the columns as well.

Replied On August 17, 2009 02:54 PM UTC

Excellent !
Works great, thanks.


Mohamed Suhaib Fahad A. [Syncfusion]
Replied On August 19, 2009 11:48 AM UTC

Hi Nazim,

Thanks for your feedbacks. We are glad that you got it working.

Grid.WPF Team
Syncfusion Inc.,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon