We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

AutofitColumns width in Desktop grid


I am using desktop grid. I want to autoset the width of each column of grid as per the width of maximum value cell of column.

Kindly give a quick reply.


You can do it with both ways i.e.., using WYSIWYG manner and using the GridDesktop's APIs.

1). On the grid, you can put the mouse cursor on your desired column header until the cursor become the handle like '+', now click the mouse button, it will auto-fit the column just like MS Excel.

2). You can do it programmatically too.



//Auto-Fit the first column in the first worksheet.



'Auto-Fit the first column in the first worksheet.


Thank you.

Thanks a lot Amjad. :slight_smile: