not sure if this is a bug or i'm doing it wrong. i've got a list grid with inline, modal editing. i've got a context menu on the list grid to initiate creating a new record in the grid. clicking the menu item should show a new empty record for the user to enter data then save. this works fine in firefox, but when i do it on IE, the listgrid shows a new row in the grid and immediately closes the new row (before the user could enter any data to the row), thus attempting to send the blank record to the server for an add operation. here's a test case
Using IE and smartclient 5.7:
Creating the first record in the list grid won't cause any problems, it only happens after creating the first record, then using the context menu to create a new record. Using the button on the side of the listgrid doesnt have any problems.
Code:
isc.DataSource.create({ ID: "ds_001", dataFormat: "xml", dataProtocol: "getParams", dataTransport: "xmlHttpRequest", operationBindings: [ { operationType: "fetch", recordXPath: "/XX", dataURL: "/findXX" }, { operationType: "add", recordXPath: "/XX", dataURL: "/createXX" } ], fields: [ {name: "Id", type: "staticText", primaryKey: true}, {name: "Name", type: "text"} ] }); isc.Menu.create({ ID: "cm_001", data:[ {title: "Create New", click: function() { lg_002.startEditingNew(); }} ] }); isc.HLayout.create({ autoDraw: true, members: [ isc.ListGrid.create({ ID: "lg_002", contextMenu: cm_001, dataSource: "ds_001", autoFetchData: false, height: 400, width: 300, modalEditing: true, fields: [ {name: "Id"}, {name: "Name"} ] }), isc.IButton.create({ title: "Create New", click: function() { lg_002.startEditingNew(); } }) ] });
Creating the first record in the list grid won't cause any problems, it only happens after creating the first record, then using the context menu to create a new record. Using the button on the side of the listgrid doesnt have any problems.
Comment