Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Before we start: I noticed the configuration object for your grid has </p> <pre><code>xtype:'grid' </code></pre> <p>This, by itself, forbids any editing capability and server interactions (besides reading the store), because you are instancing an <strong>Ext.grid.GridPanel</strong>, while (I think) you need an <strong>Ext.grid.EditorGridPanel</strong>. For all of the following to run properly, you should change this line to:</p> <pre><code>xtype:'editorgrid' </code></pre> <p>First thing I would check is that the store has an <strong>id</strong> configuration attribute, and it is a configured column of the store reader. If the store cannot identify the record, it will think that the record does not exist, and will not generate a request to the server.</p> <p>Second thing to check: has your store been configured to generate server requests? That is, is there a line like this in your store config object?</p> <pre><code>proxy: new Ext.data.HttpProxy({ api:{ read:'readscript.url', create:'insertscript.url', update:'updatescript.url', destroy:'deletescript.url' } }) </code></pre> <p>Next, have you defined the "<strong>writer</strong>" attribute in your store configuration object? The store config object should have a <strong>proxy</strong> and a <strong>writer</strong> attribute to generate proper server requests upon deletion.</p> <p>To specify a writer for the store you may simply write (for a common Json writer):</p> <pre><code>writer: new Ext.data.JsonWriter() </code></pre> <p>and the store will send all the appropriate write requests to the server.</p> <p>Another painful (not well documented, I think) issue could be the presence of mandatory fields in the store reader. All columns are mandatory by default; to mark a column as "non-mandatory" you must specify (in the store reader column array):</p> <pre><code>{name:'column_name', allowBlank:true, /* other stuff like 'type' etc. */ } </code></pre> <p>Probably, when you add a new record to the grid, not all of the columns will be populated. The store will not generate a server create request until all mandatory columns are populated. Then, if you delete an unsaved record, the store will not generate the destroy request because it will assume that the record "does not exist".</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload