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

Silverlight Grid Auto resize for rows

Thread ID:





104323 Jul 11,2012 06:15 AM UTC Jul 12,2012 07:28 AM UTC Silverlight 1
Tags: GridControl
Asked On July 11, 2012 06:15 AM UTC


Is it possible to do an auto resize for rows only in silverlight grid?

We are setting the Autoresize properties for rows and columns, however, when we have long text in the cell it is wrapped. But the cell boundaries cut the the text on the top and the bottom part.

Rajasekar [Syncfusion]
Replied On July 12, 2012 07:28 AM UTC

Hi Subi,

Thank you for your update.

You can achieve your requirement by using the below code snippet,

Code Snippet[C#]

        this.dataGrid.ModelLoaded += new EventHandler(dataGrid_ModelLoaded);
        void dataGrid_ModelLoaded(object sender, EventArgs e)
            this.dataGrid.Model.ResizeColumnsToFit(GridRangeInfo.Table(), GridResizeToFitOptions.None);
Likewise you can also use, ResizeRowsToFit method too.

Please let us know if you have any queries.



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

or the page will be automatically redirected to 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