I want to show the calendar type along with other fields in the event window and it is read only field. I have not seen any light box label control. Also, I am trying with lightboxtext control and make it readonly on client side but no luck. could you help me how to solve this issue.
Hello,
there is no label control, but you can easily emulate it,
you need to define control on the client side, just add implementation for necessary methods(they may do just nothing, since we need only label from this control).
scheduler.form_blocks["label"] = {
render: function (sns) {
return "";
},
set_value: function (node, value, ev) { },
get_value: function (node, ev) { return null },
focus: function (node) { }
};
this code must be executed before scheduler initialization.
Then you should define server-side configurator for this control(inherit from LightboxField class)
public class LightboxLabel : DHTMLX.Scheduler.Controls.LightboxField
{
public LightboxLabel(string name, string text)
: base(name)
{
this.Type = "label";//type must be the same as declared in scheduler.form_blocks["label"]
this.Label = text;
}
}
and thats it, you can use labels as any other controls
scheduler.Lightbox.Add(new LightboxLabel("l1", "My Custom Label"));
scheduler.Lightbox.Add(new LightboxLabel("l2", "My Second Custom Label"));
I am able to add the label but the value of this label is coming from database. So I used to Map property but it is not taking this. Could you please guide how to assign the database value to this label.