ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2016-03-08 08:44:27

deaspo
Member
Registered: 2016-01-29
Posts: 11

Edit_AutoAdjustColumnWidth

Hi Jing,

Could we please have this feature in the WorksheetSettings, where the column width adjusts to fit all the length of the data in the cells?

Regards.

Offline

#2 2016-03-08 10:48:50

alexeyrlx
Moderator
From: CIS
Registered: 2015-07-14
Posts: 36
Website

Re: Edit_AutoAdjustColumnWidth

Perhaps you mean this:

In VB, for column A (0):

ReoGridControl1.CurrentWorksheet.ColumnHeaders(0).FitWidthToCells()

There is a similar method for rowheaders (fitheight...).

Note: These methods do not work if you are using a workbook in memory.

Last edited by alexeyrlx (2016-03-08 10:53:28)


My English is perfect! (My version of the English language ;-) )

Offline

#3 2016-05-26 13:10:32

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Edit_AutoAdjustColumnWidth

Hi deaspo, Alexey's solution is nice idea.

In addition, the automatic column width feature added in version 1.3 as a worksheet settings, but by default it is disabled. It can be enabled by using the following code:

sheet.EnableSettings(WorksheetSettings.Edit_AutoExpandColumnWidth);

Download available at https://reogrid.net/download/

Last edited by Jingwood (2016-05-26 13:10:41)

Offline

Board footer

Powered by FluxBB