When data is read in from mySQL - it isn't 'updated'

Hi,

I now have data saving properly to mySQL. When I reload the page, the loading indicator works well, and then the events appear.

However, they don’t show the right formatting until I edit the event, and click save.

This is what it looks like when loading the data;


And after double-clicking on an event, and hitting save (the correct information is already displayed in the lightbox editor - so the information is being retrieved correctly);


I have code that formats the event - perhaps the ‘work_desc’ isn’t properly loaded by the time the CSS is applied?

[code] //set how the event is displayed
scheduler.templates.event_bar_text=function(start, end, event){
if(event.work_desc)
return “”+scheduler.getLabel(“work_desc”, event.work_desc)+“”+

”+(event.text_desc?(“Notes: “+event.text_desc):””);

		return "New Event";
	}[/code]

Is there a way to make it properly update itself once the data is loaded? Is there something else I am missing?

Thanks,

I got it to work - it has something to do with the render.

This doesn’t work;

$scheduler->render_table("events","event_id","start_date,end_date,text_desc,work_desc,section_id");

Yet this does;

$scheduler->render_table("events","event_id","start_date,end_date,event_name,text_desc,work_desc,section_id"); ?

Trying to use any of my own variables in place of ‘event_name’ means that it isn’t properly loaded back in to the event object.

What is this ‘event_name’ used for? In my tables, it always says ‘New event’.

In render_table command 3 fields are mandatory
first - start_date
second - end_date
third - text

after that you can place any custom fields

So event if you have it in render_table as “text_desc”, because it is on 3rd position - it will be available on client as event.text