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

Scheduler: Get RowHeaderColumns value

Asked by Dario
1 month ago.

Hello,
I cannot find in the documentation.
if I've something like this in scheduler:

dp.rowHeaderColumns = [
{text: 'Name', display: "name"},
{text: 'Country', display: "country"},
];
dp.resources = [
{id: "1", name: "A", country: 'IT'},
{id: "2", name: "B", country: 'UK'},
];
I need to get the country of the selected cell.
I can only get the id with args.resource
thanks

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

You can get the DayPilot.Row object using rows.find() method:

const row = dp.rows.find(args.resource);

Then you can access the original data object using row.data:

const country = row.data.country;

See also:
https://api.daypilot.org/daypilot-scheduler-rows-find/
https://api.daypilot.org/daypilot-row-properties/

New Reply
This reply is
Your name (optional):