Hi there. I’m evaluating dhtmlxGrid and I’m running into issues.
-
I can’t seem to set the height of my rows to something short. One of the values is many lines long, so the row height is pushed longer. I’d like to set the row height to always be 200px, or to have a maximum of 200px. Is this possible?
-
When I assign a column to edit type “txt”, clicking on a cell in that column shows an edit box all the way at the bottom of the screen instead of next to the object. How can I draw it next to the object?
Here is my code:
[code]
var myGrid;
myGrid = new dhtmlXGridObject('gridbox');
myGrid.setImagePath("/codebase/imgs/");
myGrid.setHeader(",Title,....");
myGrid.setColTypes("ro,ed,ed,ed,ro,ed,ed,ed,ro,ed,txt,ed,ro,ed,ed,ed,ro,ed,ed,ed,ro,ed,ed,ed,ro,ed,ed,ed,ed");
myGrid.setInitWidths("100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100"); //the widths of columns
myGrid.enableMultiline(true);
myGrid.enableEditEvents(true,true,true);
myGrid.setStyle ("font-family:\"helvetica neue\"", "height:200px;font-family:\"helvetica neue\";vertical-align:top;height:200px;overflow:hidden;", "height:200px;overflow:hidden;", "height:200px;overflow:hidden;");
myGrid.attachEvent("onEditCell",function(stage,id,index,value,old_value){
if (value != old_value && stage==2) functionCall(...)
});
myGrid.init();
myGrid.splitAt(2);
data={ rows: [
{ id: 1, data: […]},
{ id: 2, data: […]}
]};
myGrid.parse(data,“json”);
[/code]
Thanks for the help!