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

How to customize resource column value programmatically

Asked by Naush
11 years ago.

Hi,

In scheduler control, I have one resource column as shown below.

<Resources>
<DayPilot:Resource Name="Room-A" Value="101">
<Columns>
<DayPilot:ResourceColumn InnerHTML="Room # 12123" />
</Columns>
</DayPilot:Resource>

<DayPilot:Resource Name="Room-B" Value="102">
<Columns>
<DayPilot:ResourceColumn InnerHTML="Room # 3455" />
</Columns>
</DayPilot:Resource>
</Resources>

Can I customize this column value from BeforeResHeaderRender event? In this event, e.InnerHTML always returns the name of resource, not the column value. How can I set/get the Room# column value here?

Regrds,
Naush

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

You can access the Resource columns directly using Resource.Column collection:

DayPilotScheduler1.Resources[0].Columns[0].InnerHTML = "Room #12123";
Comment posted by Laura Arana
11 years ago.

Hi,

I have a similar problem, then I tried Dan's solution, but it seems that there is a syntax error or maybe an index problem... I had to use () insted [] to compile correctly in VB. Now it doesn't compile because "System.ArgumentOutOfRangeException was unhandled by user code".

Any further ideas?

Thanks a lot!

Best regards,

LAURA

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