I try to attach this event “updateCallback” as you suggested but nothing happens like before. I try to attach it to the form and also to Dataprocessor with the same no-result.
I confirm that i didn’t find any reference to these Callback functions in the Documentation. Where can i find them ?
Sorry but i haven’t a site. I’m an hobbist and i work locally.
I will try to bild a demo but there is nothing particular to verify. I followed exactly what is explained in the documentation example. The problem, i think, is your last suggestions about Callback functions that has not reference on your site. Could you tell me where is the documentation about these functions so i can understand much more and do experiments on my own.
Hi,
this events aren’t described in documentation, but they are in code (dhtmlxdataprocessor.js, the best way would be to see this code in not-compressed file):
loadUpdate: function(){
var self = this;
var version = this.obj.getUserData(0,"version");
var url = this.serverProcessor+getUrlSymbol(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+version].join("&");
url = url.replace("editing=true&","");
this.getUpdates(url, function(){
var vers = self._loader.doXPath("//userdata");
self.obj.setUserData(0,"version",self._v(vers[0]));
var upds = self._loader.doXPath("//update");
if (upds.length){
self._silent_mode = true;
for (var i=0; i<upds.length; i++) {
var status = upds[i].getAttribute('status');
var id = upds[i].getAttribute('id');
var parent = upds[i].getAttribute('parent');
switch (status) {
case 'inserted':
self.callEvent("insertCallback",[upds[i], id, parent]);
break;
case 'updated':
self.callEvent("updateCallback",[upds[i], id, parent]);
break;
case 'deleted':
self.callEvent("deleteCallback",[upds[i], id, parent]);
break;
}
}
self._silent_mode = false;
}
self._update_busy = false;
self = null;
});
}
And I did a mistake - event must be attached to dataprocessor object, not to the form.
Hi,
you code looks correctly.
Please, provide a complete demo (including all required files and database dump with test data) to get it to work at local machine.
At the end i built the attached complete demo starting from one of your examples.
I used your Tutorial with your DB contacts adding only one new Field, called ‘NUMERO’ as double, to store an example number.
The problems that i’d like to solve are:
As specified in my previous post, multi-sync user doesn’t run. When i position two computers of the local lan on the same record (in form), saving modifications from the first pc, i don’t receive the message from the Event UpdateCallback when i save the same record on the 2nd computer!
the other problem is about number formatting. You can see the “numero” definition. in FORM.XML where i set the group-separator to ‘.’ an decimal separator to ‘,’. The number string definition is “0,000” without decimals. In this situation if i write the number 1200 the fields shows correctly 1.200 but when i save in the DB i have 1,2 and when i refresh the form i have 1 in the form field.
The strange thing is that if define the number string definition as “0,000.00”, all seems run correctly and the DB too, but i don’t want decimals.
As i said in my previous post that to avoid the problem to dump database, i used YOUR DB, whose sql definition query is included in your Tutorial, so you should just have it.
The only user table that i used is CONTACTS, adding only one row named “NUMERO”, defined as DOUBLE in mysql, to show the problem about number formatting. The only other table is “actions_table” that i defined as specified in your documentation.
Hi,
I did some tests and unfortunately multi-user sync doesn’t suppoerted by dhtmlxForm.
It was designed only for components which store a lot of items.
Any idea to implement through the various event available ?
I’ve also another question about an other aspect of the suite:
I would like to built a kind of Pivot table like you can see in the attached Excel Sheet and i’d like to built through treeGrid
I built a view in MySQL that show data as in the attached sheet but i didn’t understand yet how to define the render_table function.
These are the questions:
Can i use the view as it was a table, using render_table or i’ve to use render_sql as it was a query ?
Can you explain the sintax of render_table to obtain the pivot that i attached ? Following the examples in documentation i didn’t obtain results.
have i to use treeGridConnector or treeGridGroupConnector ?
Is it better to use a single table/view like i did or is it better to use treeGridMultiTableConnector defining different query for each level even if coming from the same table ?
I’ll never stop to thank you for your help and patience.VIEW.zip (6.41 KB)