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

How to select a row in Gantt?

Asked by Roger
8 years ago.

How is the process to make a row a selected row in gantt? How to use the SelectedRow list? I want to make a row selected (also visual selected, e.g. bold) to show additional information elsewhere on the page.

Is there an example available?

And how to access the row object in the RowSelect-event as only the task-object seems to be available?

Comment posted by Roger
8 years ago.

This question belong to the ASP.NET WebForms version.

Answer posted by Dan Letecky [DayPilot]
8 years ago.

1. You can use SelectedRows property to set the selected rows.

Example that selects the first row:

DayPilotGantt1.SelectedRows.Add(DayPilotGantt1.Tasks[0]);

There is a bug in the latest release that prevents this from working. It's fixed now in the latest sandbox build (8.1.3428):

http://www.daypilot.org/sandbox/

2. In the Gantt control (DayPilotGantt) there is no special object representing a row (as one row == one task). The Task object is used. However, BeforeTaskRender event handler BeforeTaskRenderEventArgs argument class has a special property for setting row-related properties: e.Row.

See also:
http://doc.daypilot.org/gantt/row-customization/

Answer posted by Roger
8 years ago.

Can you please provide an example for the process on how to make a row selected on click? There is no dokumentatin available. Where can the gray bar be customized?

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.