Hi all,
I have add row and delete row button. it can display external of grid.
How to add the button(add row , delete row) in the internal of grid?
Many Thanks.
Hi all,
I have add row and delete row button. it can display external of grid.
How to add the button(add row , delete row) in the internal of grid?
Many Thanks.
You may any custom content to your header.
Here is the tutorial:
docs.dhtmlx.com/doku.php?id=dhtm … ader_extra
Hi sematik,
Without dhxGrid.addRow(id,’ ',0); this statement , it can show the button, but cannot add row.
dhxGrid.attachFooter("<input type=‘button’ name=‘add’ id=‘add’ value=‘add row’ onclick=‘var id=dhxGrid.uid(); dhxGrid.addRow(id,’ ',0); dhxGrid.showRow(id);’>");
I think dhxGrid.addRow(id,’ ',0); the operators problem.
Please help,
Many Thanks.
Please, try to change the default delimiter before adding a footer.
For example:
mygrid.setDelimiter("-");
mygrid.attachFooter("<input type='button' name='add' id='add' value='add row' onclick='var id=dhxGrid.uid(); dhxGrid.addRow(id,' ',0); dhxGrid.showRow(id);'>");
mygrid.setDelimiter(",");
Alternatively you can use a different syntax for attachFooter
mygrid.attachFooter(["<input type=‘button’ name=‘add’ id=‘add’ value=‘add row’ onclick=‘var id=dhxGrid.uid(); dhxGrid.addRow(id,’ ‘,0); dhxGrid.showRow(id);’>"]);
attachFooter can receive an array of values - each value will be used footer value for related column, comma in the content will not matter in such case.