1.I want to create a grid that contains two columns. col A is bank name and col B is branches of bank selected in col A. So in this case, the values listed in col B depends on value chosen in col A. How do I achieve this in dhtmlxgrid?
2.How do I add new row in dhtmlxgrid? do I need to manually create a button that calls the add row method?
3.Is it possible to load the contents of dhtmlxgrid in form of json?
4.How do I get all the contents in the grid and send the data in json string to server?
Thanks
Here is grid for JSON loading …
grid.load(url,"json");
// or
grid.load(url,callback,"json")
Here is adding row:
grid.addRow(123,"text1,text2",1);
// or
grid.addRow(124,["text1","text2"],2);
Read the documentation its all there.
how about question number 1? I can’t seem to find the topic in the docs.
Thanks
You may try to set type of the second column to read only combo-box (coro type), which editing will be disabled (for example using onEditCell).
Depending on selecting the cell in the first column (onRowSelect event) you may change the value of cells in the second column (grid.cells(rId,1).setValue(“value1”)))