Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mazhar on Oct 31, 2008 08:21
open dhtmlx forum
dhtmlXVault - Reload the DhtmlXGrid after uploading the files with the attachment details.

dhtmlXVault - Reload the DhtmlXGrid after uploading the files with the attachment details.

The below code works fine if the record is already existing, incase if is the first attachment uplooded , mygrid.getRowsNum always return a zero where as it should be "1"

if (mygrid.getRowsNum() > 0)
{
var pnl = document.getElementById('ctl00_Body_pnlAttachmentGrid');
pnl.style.display = 'inline';
//alert('inside loop');
}


We are calling the generateGrid() method in dhtmlxVault.js as below

if (this.isUploadFileAll == "true")
{ this.uploadAllItems(); };
if(typeof generateGrid == "function")
{ generateGrid();}
Answer posted by Support on Nov 03, 2008 03:59
Its not pretty clear from provided snippet, but please beware , if you are using grid.load operation - it is async., so you need to catch the moment of data loading before executing any data related operation. ( onXLE event or second parameter of load command )