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

column width auto resize

Thread ID:





105693 Nov 13,2012 03:57 PM UTC Nov 28,2012 10:27 AM UTC WPF 1
Tags: GridControl
Mary Fontana
Asked On November 13, 2012 03:57 PM UTC

I am using  ColumnSizer="Auto" .
Is there a way to get the column to resize as  you edit a cell?
For example,  if the cell width  shows only 3 digits  and you enter in more digits, the column width will resize to show the entire cell value as you type in digits.

Ravi Shankar B [Syncfusion]
Replied On November 28, 2012 10:27 AM UTC

Hi Mary,


We have analyzed your query and you can achieve it by handling CommittedCellInfo event and invoke the ResizeColumnToFit method and pass the column and GridResizeToFitOption as parameter as follows.

 public ViewWindow()



            this.syncgrid.Model.CommittedCellInfo += new GridCommitCellInfoEventHandler(Model_CommittedCellInfo);



        void Model_CommittedCellInfo(object sender, GridCommitCellInfoEventArgs e)


            this.Dispatcher.BeginInvoke(new Action(() =>


                this.syncgrid.Model.ResizeColumnsToFit(GridRangeInfo.Col(e.Cell.ColumnIndex), GridResizeToFitOptions.None);





We have created a simple sample and you can download this from following link.




Ravi Shankar B.


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