eladr
March 17, 2011, 9:17am
#1
Hi,
i have grid and in rowSelected event i want to get the value of some hidden cell (in addition to the id course).
can i do it in the free version?
first thing i need to hidden a cell and second i need to display it in the rowSelected event.
Thanks in advance
You can access value of cell in both standard and pro versions as
grid.cells(id. index).getValue();
But standard version of grid doesn’t support hidden columns. So intead of hidden cell you can use other ways to store extra info in the grid.
docs.dhtmlx.com/doku.php?id=dhtm … attributes
eladr
March 17, 2011, 10:40am
#4
i see the solution for storing data is for xml.
i’m building my grid using dynamic json string coming from server…
any solution for that?
mygrid1 = new dhtmlXGridObject(‘gridbox_Log’);
mygrid1.setImagePath(“codebase/imgs/”);
mygrid1.setHeader(“eventid,creation date,creator,description,severity”);
mygrid1.setInitWidths(“100,150,150,300,100”)
mygrid1.setColAlign(“center,center,left,left,center”)
mygrid1.setColTypes(“ed,ed,ed,ed,ed”);
mygrid1.getCombo(5).put(2,2);
mygrid1.setColSorting(“str,str,str,str,str”)
mygrid1.setSkin(“light”)
mygrid1.init();
mygrid1.load(“GetResults.aspx?action=log&dateState=”+dateState+"&iwfid=0",getResults(),“json”);
include dhtmlxgrid_json.js
Now you can use
[{
id:1,
userdata:{ a:1 }, //will be accessible through grid.getUserData("1","a");
some:"value" // grid.getRowAttribute(1,"some");
}]