The error only seems to happen after I have been using the grid a bit. Never on the first click of a button. The error can occur on scrolling, mouse over, click and probably some other interactions.
Here is the stack trace:
Ext.view.Table.override.indexInStore (ext.axd?v=31188:1476)
Ext.cmd.derive.processUIEvent (ext.axd?v=31188:18)
b.implement.callParent (ext.axd?v=31188:18)
Ext.view.Table.override.processUIEvent (ext.axd?v=31188:1464)
Ext.cmd.derive.handleEvent (ext.axd?v=31188:18)
Ext.view.View.override.handleMouseOverOrOut (ext.axd?v=31188:1500)
(anonymous function) (ext.axd?v=31188:18)
The error is taking place in the Ext.view.Table.override.indexInStore area.
some more detail:
<exception>: TypeError
message: "Cannot read property 'isCollapsedPlaceholder' of undefined"
stack: "TypeError: Cannot read property 'isCollapsedPlaceholder' of undefined↵ at Ext.view.Table.override.indexInStore (http://localhost:51790/extnet/extnet-all-js/ext.axd?v=31188:1476:55)↵ at Ext.cmd.derive.processUIEvent (http://localhost:51790/extjs/ext-all-js/ext.axd?v=31188:18:1059284)↵ at b.implement.callParent (http://localhost:51790/extjs/ext-all-js/ext.axd?v=31188:18:50639)↵ at Ext.view.Table.override.processUIEvent (http://localhost:51790/extnet/extnet-all-js/ext.axd?v=31188:1464:13)↵ at Ext.cmd.derive.handleEvent (http://localhost:51790/extjs/ext-all-js/ext.axd?v=31188:18:1058679)↵ at Ext.view.View.override.handleMouseOverOrOut (http://localhost:51790/extnet/extnet-all-js/ext.axd?v=31188:1500:153)↵ at http://localhost:51790/extjs/ext-all-js/ext.axd?v=31188:18:26457"
get stack: function () { [native code] }
arguments: null
caller: null
length: 0
name: ""
prototype: Object
__proto__: function Empty() {}
<function scope>
set stack: function () { [native code] }
__proto__: Error
constructor: function TypeError() { [native code] }
name: "TypeError"
stack: undefined
__proto__: d
node: undefined
recordIndex: undefined
Here is the code for the grid:
@{
var X = Html.X();
}
@(X.ResourceManager())
<script>
var listener = function (record, command, grid) {
grid.getSelectionModel().select(record);
if (command == "ignoreAccount") {
Ext.net.DirectMethod.request({
url: '@(Url.Action("IgnoreNewAccount", "AlbridgeImport"))',
params: { accountNum: record.get("AccountNum") }
});
}
if (command == "linkToClient") {
App.newClientForm.hide();
var newAccount = App.NewAccountsGrid.getRowsValues({ selectedOnly: true });
var accountNumber = newAccount[0].AccountNum;
App.ClientStore.clearFilter();
App.newClientWindow.show();
}
};
</script>
@(X.GridPanel()
.ID("NewAccountsGrid")
.Title("Unlinked Accounts as of " + @ViewData["ValueDate"])
.Width(700)
.MessageBusListeners(new MessageBusListener
{
Name = "AccountSubmitted",
Fn = "reloadAccountsGrid"
}
)//messagebus
.Store(X.Store()
.ID("NewAccountsStore")
.Proxy(
X.AjaxProxy()
.Url(Url.Action("GetNewAccounts"))
.Reader(X.JsonReader().Root("data").TotalProperty("total"))
.FilterParam("Name")
)//Proxy
.Model(X.Model()
.Fields(
new ModelField("AccountNum", ModelFieldType.String),
new ModelField("FirstName", ModelFieldType.String),
new ModelField("LastName", ModelFieldType.String),
new ModelField("AccountType", ModelFieldType.String),
new ModelField("AccountName", ModelFieldType.String),
new ModelField("TaxStatus", ModelFieldType.String)
)//fields
)//model
)
.ColumnModel(
X.RowNumbererColumn().Flex(1),
X.Column().Text("Account Number").DataIndex("AccountNum").Flex(2),
X.Column().Text("First Name").DataIndex("FirstName").Flex(2),
X.Column().Text("Last Name").DataIndex("LastName").Flex(3),
X.Column().Text("Account Type").DataIndex("AccountType").Flex(2),
X.ImageCommandColumn()
.Commands(
X.ImageCommand()
.CommandName("ignoreAccount")
.Icon(Icon.Delete)
.ToolTip(tt => tt.Text = "Ignore this account"),
X.ImageCommand()
.CommandName("linkToClient")
.Icon(Icon.NoteEdit)
.ToolTip(tt => tt.Text = "Link or Create")
).Flex(1)//Commands
.Listeners(ls =>
{
ls.Command.Handler = "listener(record, command, this.up('grid'));";
})//Listeners for CommandColumn
)//ColumnModel
.View(X.GridView().StripeRows(true).TrackOver(false))
)