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

ResizeToFit for custom CellModel

Hi, I''ve got a custom CellModel. It''s a set of icons. It may contain from one up to 10 icons. What things I have to do for ResizeToFit method works correctly for this CellModel?

1 Reply

AD Administrator Syncfusion Team July 2, 2004 01:04 PM UTC

In your cell model class, you need to override CalculatePreferredCellSize, and in your override return the proper size for your cell based on the information passed in. This is the method that grid.Model.ColWidths.ResizeToFit and grid.Model.RowHeights.ResizeToFit calls to get the values it uses to determine the sizes.

Live Chat Icon For mobile
Up arrow icon