Dec 01, 2009, 11:22 AM
[CLOSED] Buffered Grid View Scrolling
Hi,
I have a buffered grid panel that has a limit of 500 records per page. If the grid contains 500 rows and I click my "Add" button which adds a new row to the grid using:
function bulkUpdateDataAddNew()
{
var lpIndex = strData.data.length; //Get max index
strData.insertRecord(lpIndex, { id:Ext.id(null, "New-"), RowStatus: "1" }); //Add new record to store
var opRecord = strData.getAt(lpIndex); //get record added above
opRecord.RowStatus = "1";
opRecord.set("EntityID", "New");
opRecord.commit();
opRecord.firstEdit = true;
opRecord.newRecord = true;
grdData.getView().focusRow(lpIndex);
grdData.startEditing(lpIndex, 3); //start column editing at index position 3 as the first 3 columns are read-only (Row Number, Delete, ID)
}
This adds a new row but when the first cell becomes editable the control is displayed two rows below the new row. Please see attached picture for an example of what I mean. Is there a way that I can prevent this from happening?If I remove the line "grdData.startEditing(lpIndex, 3);" the scrolling works OK but I need this functionality!
Thanks
Beth