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. Image for the cookie policy date
close icon

Silverlight Grid Auto resize for rows

Hi,

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.

1 Reply

RA Rajasekar Syncfusion Team 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.

Thanks,
Rajasekar


Loader.
Live Chat Icon For mobile
Up arrow icon