Categories | Question details Back To List | ||
cant attach grid Hi there. I can't attach the paginal-output to my grid, because I don't have an element ID to put on enablePaging() function call I'm using the declaration to instance the grid object: var mygrid = w1.attachGrid(); function newWindowGridPessoa(theme, dhxWins){ dhxWins.setSkin("dhx_blue"); var w1 = dhxWins.createWindow("pessoa_op", 0, 0, 950, 360); w1.setText("Pessoa"); w1.centerOnScreen(); w1.setIcon("img/autor.png","img/autor.png"); var webBar = w1.attachToolbar(); webBar.addButton("editar_", 0, "Editar", "img/edit.png", "img/edit.png"); webBar.addButton("excluir_", 1, "Excluir", "img/delete.png", "img/delete.png"); webBar.addButton("novo_", 2, "Novo", "img/new.png", "img/new.png"); webBar.addSeparator("separator_", 4); webBar.addButton("primeiroReg_", 5, "", "img/first.png", "img/first.png"); webBar.addButton("anteriorReg_", 6, "", "img/back.png", "img/back.png"); webBar.addButton("proximoReg_", 7, "", "img/send.png", "img/send.png"); webBar.addButton("ultimoReg_", 8, "", "img/sendnext.png", "img/sendnext.png"); webBar.addSeparator("separator2_", 9); webBar.addSlider("paginacaoEle_", 10, 200, 1, 100, 10, "1", "100", "%v"); webBar.addSeparator("separator3_", 11); webBar.addInput("busca_", 12, "", "160"); webBar.addButton("exebusca_", 13, "", "img/search.png", "img/search.png"); webBar.addButton("canbusca_", 14, "", "img/recycleBinEmpty.png", "img/recycleBinEmpty.png"); webBar.attachEvent("onClick", function(id){ if(id == "novo_") alert("a"); }); var mygrid = w1.attachGrid(); mygrid.setImagePath("dhtmlxGrid/codebase/imgs/"); mygrid.setHeader("Nome,Tipo,CPF/CNPJ,Status,Editar"); mygrid.setInitWidths("620,70,100,60,60"); mygrid.setColAlign("left,left,left,right,right"); mygrid.setSkin("modern"); mygrid.setColTypes("ro,ro,ro,ch,ro"); mygrid.enablePaging(true,25,3,"",true); mygrid.setPagingSkin("bricks"); mygrid.init(); mygrid.loadXML("Xml/xmlPessoa.php"); }; Answer posted by dhxSupport on May 27, 2009 08:49 In such case the only way to attach grid to the dhtmlWindow is to use attachObject() method to attach container with grid and paginal area. |