Light box description section height change?

Hi All,

I am trying this DHTMLx scheduler for my calendar events and I am not sure how to change the height of description section of light box. Because of the description section my light box is becoming too big.
I have added the recurring events extension, and added some other fields of events table on to the light box. Since I have recurring events I am not using the custom light box.
Please let me know if anyone has the answer.

Hi,
each control has ‘Height’ property, so you can define it explicitlyvar text = new LightboxText("text", "Description"); text.Height = 50; scheduler.Lightbox.Add(text);

Thanks for your reply, I have used this before, but this adds two descriptions inside the lightbox.
In order to have the recurring events, I have to add the
scheduler.Lightbox.AddDefaults();

which gives the description field by default and I need to change the height of this default description field.

Hi,
you can add all controls manually. AddDefaults simply add several preconfigured controls, using a public API. For example, add three controls - text, recurring and time:

scheduler.Lightbox.Add(new LightboxText("text", "Details") { Height = 42, Focus = true }); scheduler.Lightbox.Add(new LightboxRecurringBlock("rec_type", "Repeat")); scheduler.Lightbox.Add(new LightboxMiniCalendar("time", "Time period"));

Thank you for your reply.
I could make the changes in the lightbox as per your suggestions and it worked.

Now I am having another problem while saving the data into the database when I update the fields in the lightbox. I can see the color change of an event but it is not updating into the database. My code looks like this

In my Index view I am adding a checkbox

var check = new LightboxCheckbox(“eventtypeid”, “Mark this event as Cancel”);
check.MapTo = “eventtypeid”;
check.CheckedValue = 4;
scheduler.Lightbox.Add(check);
and also
scheduler.Data.DataProcessor.UpdateFieldsAfterSave = true;

While saving the data I am adding the following code
public ActionResult Save(int? id, FormCollection formData)
{
//code to save my recurring events according to the action types
var result = new AjaxSaveResponse(action);
var color ="";
if (changedEvent.eventtypeid == 4)
{
color = “red”;
result.UpdateFields(new Dictionary<string, object>{
{“color”,color},
{“eventtypeid”,Convert.ToInt32(changedEvent.eventtypeid)}});
}

       return result;

}

Hi,

result.UpdateFields(new Dictionary<string, object>{ {"color",color}, {"eventtypeid",Convert.ToInt32(changedEvent.eventtypeid)}}); }Make sure you assign a color value to the object which is saved to the database.
The ‘result.UpdateFields’ property only specifies a collection of values that will be sent to the client and applied to an edited event, it does not saves values to database automatically.