Retrieve Data of additional controls placed on lightbox

We are able to add additional control with the help of scheduler-net.com/docs/lightbox.html example but can you please provide some guide that how to load data in these custom control and how to pass the data to server for these additional control which is placed in the lightbox.

Jitendra Agarwal

lightbox controls can be mapped to event propertyes, all of them have MapTo property(by default it uses first parameter of object constructor),
e.g.

var desc = LightboxText("description", "Description");

will load data from the Event.desctiption property.
When you press ‘Save’ button scheduler sends data for all controls. You can retrieve it from the form collection(Controller.Request.Form[“key”]). Keys will be equal to the names of the controls.
this code will get value of the control defined above:public ContentResult Save(int? id, FormCollection actionValues){ var decription = this.Request.Form["description"];

If you use some model binder for the save action, saving of this values won’t requre any additional code

We are also looking for Normal asp.net page the save.ashx page contains following method which process the request on save…

public void ProcessRequest(HttpContext context)
{
}

I did’t find new controls in context object. Can you please help me on this as well.

Thanks in Advance.

I have one more question… if i am putting the additional control in lightbox all the existing controls is getting disappeared…

Hello,
yes, default set of controls disapears, when you add a custom ones.
you can add them using

scheduler.Lightbox.AddDefaults(); orscheduler.Lightbox.Add(new LightboxText("text", "Description")); scheduler.Lightbox.Add(new LightboxTime("time", "Time:"));

Hello,

I am trying to access additional control data using following method mentioned by you but the control is not available in the Request.Form Collection.


public ContentResult Save(int? id, FormCollection actionValues){
var decription = this.Request.Form[“description”];

Hello,

If I am using scheduler.Lightbox.AddDefaults(); the recurring option got disappeared.

Second when I am trying to access additional control data using following method mentioned by you but the control is not available in the Request.Form Collection.


public ContentResult Save(int? id, FormCollection actionValues){
var decription = this.Request.Form[“description”];

you need to set this control manually

scheduler.Lightbox.Add(new LightboxText("text", "Description")); scheduler.Lightbox.Add(new LightboxRecurringBlock("rec_type", "Recurring"));//note that recurring control should go before time control scheduler.Lightbox.Add(new LightboxTime("time", "Time:"));

can you attach a demo where it can be tested?