search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Scheduler - How to set row header columns to a very compact width

Asked by Anonymous
1 year ago.

I'm setting rowHeaderWidthAutoFit to true, so the row header column width is adjusted automatically. However, I want the width to be more compact. See please the comparision in the two attached screenshots.

Answer posted by Dan Letecky [DayPilot]
1 year ago.

By default, the Scheduler only extends the width automatically (to fit the text). If you want to show narrower columns, you can either enable shrinking (rowHeaderWidthAutoFitShrink) or set a smaller default column width (rowHeaderColumnDefaultWidth).

See also:
https://doc.daypilot.org/scheduler/row-header-width-auto-fit/

Comment posted by Anonymous
1 year ago.

If I set rowHeaderWidthAutoFitShrinkto to true, the row headers disappear completely.

Comment posted by Anonymous
1 year ago.

This is caused by the option rowHeaderScrolling set to true. If I remove it, the row header columns don't disappear. However, the columns width is still the same and not that compact.

rowHeaderScrolling: true,
rowHeaderWidthAutoFitShrink: true,
rowHeaderWidthAutoFit: true, 
Comment posted by Dan Letecky [DayPilot]
1 year ago.

There turned out to be a problem with shrinking. It should be fixed now in the latest sandbox build (2023.1.5532). It should also work fine with "rowHeaderScrolling: true".

Please let me know if the problem persists.

Comment posted by Anonymous
1 year ago.

Thanks. This solved the problem.
However, there are two other issues with wrapping the columns caption and with active areas. Please check the attached video.

Comment posted by Dan Letecky [DayPilot]
1 year ago.

At this moment, the column width auto-fit doesn't take the column titles and the active areas into account.

However, you should be able to use the "width" property of a column to set a minimum width (reflecting the title and/or active areas - they are known in advance). If you turn the shrinking off, this value will be used as the starting value when extending the width:

rowHeaderColumns: [
  { text: "Column1 ", width: 60 },
  // ...
},
rowHeaderWidthAutoFit: true,
rowHeaderWidthAutoFitShrink: false,
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.