I have 52 rows with Data and 53 row with empty columns…
Suppose I edit the 53th row and click the enter key…
54th row is should be created with empty columns and Hidden coloumns also
How can we do in the DHTML grid.
Please suggest some solutions.
Thanks and Regards
Udhayabalachandar.C
Please suggest some solutions.
You can use code similar to next
mygrid.attachEvent(“onEnter”,function(id,ind){
if (this.getRowsNum() == (this.getRowIndex(id)+1))
mygrid.addRow(mygrid.getUID(),[],-1);
return true;
})
As result, pressing of enter key in last row will cause adding of new row.
Hi dude…
Using Your Script I created Empty Rows. And Enter cell values. Simillarly I created 5 rows and Enter the values in the 5 Rows and Click Save Button
only one record is saved and Script Error is occured
This is the Save method Which I call for Save
function save(){
myDataProcessor.setOnAfterUpdate(function(){
if (myDataProcessor.getSyncState()) after_save();
});
myDataProcessor.sendData()
};
function after_save(){
mygrid.clearAll(true);
mygrid.loadXML(“sms/update.jsp?action=get_data”,function(){
mygrid.setColumnHidden(2,true);
mygrid.setColumnHidden(3,true);
mygrid.setColumnHidden(4,true);
});
};
Please check the response generated by server side code, it must be correct XML with correct sid and tid values
To check details of server side response you can use
myDataProcessor.enableDebug(true)