Questions about funcionality

Hi i’d like to know if scheduler can do next things and how:

  • Show lightbox althought scheduler is in mode no edit, id like thet user can see details about event but not modified

  • Block some events, but not all: for example, some of my events can be modified by the user but another one user could do it, is it possible?

  • set different color (background color) to event (in my app every event can get different BG color)?

  • in my app, when someone create an event it must be validated in server (conflits with anothers events or places full…), is it possible to deny event creation, and show an error message about problem?

Thanks in advance.

Hello,
all of this things are possible,

it can be done from server code scheduler.Extensions.Add(SchedulerExtensions.Extension.Readonly); scheduler.BeforeInit = new List<string>() { "scheduler.config.readonly_form = true;" };

scheduler has some built-in helpers for restricting user permissions(you may check room booking demo from blog blog.scheduler-net.com/post/2012 … p-net.aspx). More complex cases can be done by client-side code

you may assign background and text color for each event(see “Custom Field” sample from the package)

yes, you can deny operation on the server, assign error status to the data action, and handle it on the client(js)

dp.attachEvent("onAfterUpdate", function(sid, action, tid, tag){ if (action == "error"){ //do something } })

Thanks,
im making test with your product.
Id like to know if its possible make a custom lightbox for an ASP.NET web app, not MVC and how could i do it.

Thanks in advance.

You can do it the same way as it done in mvc sample
1)create aspx/ascx file with form
2)attach the form: DHXScheduler.Lightbox.SetExternalLightbox("Url to the form page", width, height);
3)update “Save” handler to process form requests

btw, there was a bug with custom forms in one of the recent trial versions, so make sure you have the latest version of the lib

Thanks again,

well we have found a problem when we want to print to pdf , it show us an message error: “thre was an error with this page…”

Our script is based in your info:

Hi,
can you post the error description?

The message i get:

“An error exists on this page. Acrobat may not display the page correctly. Please contact the person hwo created the PDF document to correct the problem.”

Then page in pdf doc is blank

Thanks in advance

There is temporary issues with online export service(it works with chrome, but not with ie and ff for now), it will be fixed soon.
You may try use local export tool instead support.dhtmlx.com/x-files/beta_ … df-net.zip

Ok thanks, do you have any example just for a ASP.NET webapplication (not MVC)
Thanks in advance.

The sample is attached,
note that there is one difficulty with scheduler to pdf export with .net tool,
when you print calendar, it serializes it’s state to xml, and sends it to the server as is, without encoding. Because of that you can get “Potentially dangerous Request.Form value was detected” exception.
To avoid it you can either change request validation rules in web.config,
or you may slightly modify dhtmlxscheduler_pdf.js (which is located in /dhtmlxScheduler/ext) to make it send encoded values. To achieve this, you need to replace this line(dhtmlxscheduler_pdf.js , line:251)

document.getElementById(uid).firstChild.value = xml_top(mode).replace("\u2013", "-") + xml_body() + xml_end();

by the following

document.getElementById(uid).firstChild.value = encodeURIComponent(xml_top(mode).replace("\u2013", "-") + xml_body() + xml_end());

_pdf.js from the sample has been already modified that way
scheduler-net-asp.zip (687 KB)

Thanks again, im gonna try it.

I got another problem for testing recurrent events.
In your examples, recurrence block in lightbox got at righ side seems like this:

But in my lighbox it seems like image i have uploaded.
i hve configured

but it doenst fix it…any idea?

Thanks for your great support.

It looks as css conflict, are you loading some other css on the page? It seems that additional css has some global styling rules which breaks look of recurring events section. ( global td, div, span rules most probably )

Hi, i have fixed my problem in recurring block , i have changed in css:

.dhx_repeat_right { float:right; height:115px; width:160px; padding:10px 3px 10px 10px; margin-top:7px; }

width to 159px, and now it works.

I got another issue.

In shedule i got setted :

Scheduler.Config.mark_now = true;

But i dont see mark in calendar.
id like to now too if time marked is client time or server time.

Thanks in advance.

Hello,
Time mark requires Limit extension to be included. scheduler.Extensions.Add(SchedulerExtensions.Extension.Limit); It marks client time.
You can disable the rest of the extension, so that it had no effect on application performance: using this config scheduler.config.check_limits = false;
yet there is no server-side implementation of this config, so you can do it on the client only

Hi,
i got anothers question very important for my app performance.
Id like to know:

  • I have my own template for Tootltip, it works fine but id like Star Time and End Time format in Tooltip is always YYYY-MM-DD, is is possible to edit date format in tooltip text?

  • In week view, if i have applied code for making events not editable but can be show form details, then at left side of event block it show a bar with 3 pics: for editing, show details and deleting. Id like to modify those bar when calendar is jus readonly, so int bar only would show “view details” pic, is it possible?

  • this is very important: in my app (an school manage web app), i got some some people that in calendar thay can see in the same calendar all their academic timetable and personal appointments, data came from differents sources althought the item class is the same (just for operative purpouse), at the end it shows data perfectly but i need make un-editable all academic events, 'cause academic data is not editable.
    So, how can i set that some events can be editable and anothers one just readonly (example from roombooking is not valid for me because it’s not a question of date of event or authenticated user)?
    if not, could it be possible that in future release we could set in every event if it’s readonly or not (for example throught a property like in color or textColor)?

Thanks in advance.

Another thing that i have seen, and dont know if it’s a bug or just a conlict of funcionality, is that when it’s added Extensions Limit and Collision, cant be edited or inserted any event 'cause button Save in Lightbox doesnt do anything.

1)it’s pretty easy to define it on a client

var format=scheduler.date.date_to_str("%Y-%m-%d"); scheduler.templates.tooltip_text = function(start,end,event) { return "<b>Event:</b> "+event.text+"<br/><b>Start date:</b> "+format(start)+"<br/><b>End date:</b> "+format(end); };
2)these buttons are defined in scheduler.config.icons_select property, it’s only available on the client,
the default value is scheduler.config.icons_select = ["icon_details","icon_edit","icon_delete"]
to show only details icon, you may override it as following scheduler.config.icons_select = ["icon_details"];
3)yes, its possible to make some events not-editable, you need to:
enable Readonly extension: Scheduler.Extensions.Add(SchedulerExtensions.Extension.Readonly);
and add ‘readonly’ property to events(if ‘readonly’ is true, user will be able only to view its details).
you may add such property right into the event class public bool readonly{get{ return this.IsAcademic(); }}
or you can do it during rendering

new SchedulerAjaxData(new DHXSchedulerDataContext().Events .Select(e => new { e.id, e.start_date, e.end_date, e.text, @readonly = e.IsAcademic() }));

confirmed,
we’ll fix it in the nearest time

The bug with collision and limit extensions is fixed now,
here is the updated version of js codebase
dhtmlxScheduler120719.zip (186 KB)

Thanks for your great support.

I got a problem when i try to set a readonly property to the event class, because readonly is a key word.
How could i work it our?

Thanks.

Well its solved, just name the property like this:

public bool @readonly{ get; set; }

But i got another problem,
it seems everything works fine: for events readonly, lightbox view is right, but lightbox for events that can be edited misses Save button.