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.
Unfortunately, activation email could not send to your email. Please try again.

Silverlight Grid Auto resize for rows

Thread ID:

Created:

Updated:

Platform:

Replies:

104323 Jul 11,2012 02:15 AM Jul 12,2012 03:28 AM Silverlight 1
loading
Tags: GridControl
subi
Asked On July 11, 2012 02:15 AM

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.

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

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


CONFIRMATION

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.

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.

;