Events containing foreign key values in lightbox.

Hello, I am planning to buy DHTMLX Scheduler component. To test it first, I am trying to build application based on this tutorial:

blog.scheduler-net.com/post/2012 … razor.aspx

I am solving following issue:

When I click on an Order event and Lightbox is opened, I need to display data in Select control which is not from Order table, but from another one related M:N to Order table.

However Lightbox controls seem only to be able to mapTo fields from Order table.

Is there a way to map a Lightbox control to a field from related table through foreign key?

Hello,
if several values from other table can be related to Order, maybe you need to use MultiSelect control.

However Lightbox controls seem only to be able to mapTo fields from Order table.
That is correct, the controls checks the mapped property of the data object. If you store the relation in a separate table - [OrderId,SomethingAnotherId], the data item that is loaded to the client-side still has to contain it. So you have to create appropriate property in the order model class and handle it when you loading and saving the data.
If you add multiselect control, the mapped property can contain comma-separated values:
EventModel.MappedProperty = string.Join(",", AnotherIds);

scheduler-net.com/docs/data_coll … down_lists

Aliaksandr,
thanks for your reply. Appreciate your help.

So you have to create appropriate property in the order model class
Could you please show me an example how to do this? I am trying to solve this issue for some time without moving forward…