Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by bgf on Nov 26, 2009 11:08
open dhtmlx forum
Grid + dataprocessor + splitAt + delete

Dear DHTMLX,
I use dhtmlxGrid v.2.5 Professional edition build 91111, with dataprocessor and I defined a split at column 1.
Insert and update works fine.
Delete command, delete data in database and clear columns from column 2 to end, but don't clear the column 1 (frozen).
Dataprocessor console has no errors, but updatedRows.length is > 0.
I use skin.
My code is :

tbc = new dhtmlXGridObject('dtbc');
wst = wtbccol.ragso + ','
wst += wtbccol.indir + ','
wst += wtbccol.cap + ','
wst += wtbccol.citta + ','
wst += wtbccol.prov + ','
wst += wtbccol.stato + ','
wst += wtbccol.telef + ','
wst += wtbccol.fax + ','
wst += wtbccol.email + ','
wst += wtbccol.rifer + ','
wst += wtbccol.idute
tbc.setHeader(wst);
tbc.setInitWidths('250,250,50,100,50,80,80,80,80,80,0');
tbc.setColAlign('left,left,left,left,left,left,left,left,left,left,left');
tbc.setColTypes('ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed');
tbc.setColumnIds('ragso,indir,cap,citta,prov,stato,telef,fax,email,rifer,idute');
tbc.enableTooltips('false,false,false,false,false,false,false,false,false,false,false');
tbc.imgURL = 'dhtmlxGrid/codebase/imgs/';
tbc.setSkin('dhx_skyblue');
tbc.attachEvent("onKeyPress",function(keycode,ctrl,shift,event_object){
if (this.editor) return true;
if (ctrl){
    if (keycode==45){
        addGrid();
        return false;
    } else {
    if (keycode==84){
        tradGrid();
        return false;
    }    else {    
    if (keycode==83){
        saveGrid();
        return false;
    }}}            
} else {            
    return true;
}                
});    
tbc.init();
tbc.splitAt(1);        
DB.Oper.ClientiLoad(gpath,true,gidute,wlivc,loadGridPost,ErrHandler); // loading data from WebService

function loadGridPost(result){
    tbc.parse(result);
}

Many thanks,
Best regards
Answer posted by Stanislav (support) on Nov 27, 2009 00:56
Please be sure that loaded xml contains unique IDs for each row. Using non-unique IDs may cause effect similar to the described one.
If ID's is unique but problem still occurs - please provide a sample of data for which problem is occurs ( you can send it directly to support@dhtmlx.com

By the way , used js code is fully correct and must not cause problems on its own.