hi,
we have a requirement to load data in accordion from server and convert the same into DHTMLx grid once the table formation is completed. so when onBeforeActive event is trigerred an AJAX call is sent to server the data is loaded in table but before the table is converted to DHTLx table using JS onActive event is triggered, is there a way to add delay between onBeforeActive and onActive events. or we can add some kind of loading message/img so that table is hidden for that time.
Thanks
Hi,
why do you need to set delay between events if you could set delay for the action that you call in the onActive event ?
the delay was required because the time taken by ajax call to load data completely was dependent on server and if the load time increases the table was not getting formed. As a result using
var basicgrid = new dhtmlXGridFromTable(gridId);
gives object not found and screen breaks.
I have implemented the same using Jquery now as below:
function onBeforeActive(itemId) {
callAjax(itemId);
return itemId;
}
function callAjax(itemId){
var itemNo = itemId-1;
var myForm = document.getElementById('versionDataForm');
myForm.activeVersion.value = itemNo;
var data = $('#versionDataForm').serialize();
var divID = 'tableObj'+(size - itemId+1);
$.ajax({
url: 'getData.action',
data: data,
type: 'POST',
success: function(data) {
$("#"+divID).html(data);
createTable("basicgridbox"+itemNo,itemNo);
}
});
}
this issue is resolved thanks.
Hi,
I am having the same issue using with in the application.
-
We have JQuery-Ajax submit call loading the data table.
-
We using dhtmlXGridFromTable to convert datatable.
-
Getting an error as "dhtmlXGridFromTable " var my grid= new dhtmlXGridFromTable(gridId);
gives object not found and screen breaks. -
as you mentioned previous createTable(“basicgridbox”+itemNo,itemNo); what is this function.
Support team, this issue is stopping us to go further for our development.
Please help asap.
Hi,
could you attach the demo that reproduces the problem ?
Hi,
Here is our problem, we could not reproduce outside our application. Here is our application architecure, jsp --> submit Jquary-Ajax -> struts 2.0 action -> return back to jsp.
- Jsp will invoke struts2.0 action using Jquery-Ajax submit(Jquery 1.6)
After struts actions invokes dhtmlxgrid table conversion breaks.
Can you give us some sample program for dhtmlxgridtable using struts 2.0 action submit.
We suspect that there dhtmlxgridTable having problem with Struts2.0.
Please provide us if any had same issues or sample program using struts2.0(jquery) with dhtmlxgrid.