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

Scheduler: Get RowHeaderColumns value

Asked by Dario
2 years 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]
2 years 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/

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