How to set width of event cell in TimelineView

I’m currently using DHTMLX.Scheduler in ASP.NET MVC.
How to set width of event cell in TimelineView,

Default 100px, I want to set 50px,
please help me,
Thanks a million.

Hi @Phong_Nguyen,

By default, the column width (in the Timeline view) calculated according to the number of columns and the width of the main Scheduler container.
You can check it in this sample if you resize the window.

If horizontal scroll enabled in your app, you can configure the column’s width using the column_width property of createTimelineView method. I created this sample and set there column_width:50 according to your requirements:
http://snippet.dhtmlx.com/24a793848

Thank you for your responding,
But I’m using DHTMLX.Scheduler in ASP.NET MVC - http://scheduler-net.com/
(Becuz the setting which you recommend me it seems like GPL version of JavaScript instead of .net nuget package licensee version)

@Phong_Nguyen

The provided solution suits for all version, including Scheduler .NET. Did you try it?

Actually I create a new TimelineView on the server side (See the image below).

Link reference: Hotel Room Booking Calendar in ASP.NET MVC5 Scheduler Docs

@Polina
Could you pls tell me property column_width in server side ?
I can’t see it.
Many thanks.

Hello,
We’ve just published a new bugfix of dhtmlx Scheduler .NET, and added a missing property to the TimelineView class
If you update to the version 4.0.2 or newer https://www.nuget.org/packages/DHTMLX.Scheduler.NET/4.0.2 , the TimelineView class will have ColumnWidth property:

var timeline = new TimelineView("timeline", "section_id");
timeline.ColumnWidth = 90;

Thank you for your response.
I will check it later.

BTW, Could you pls help me to answer this question ?

I really appreciate that.

1 Like