Note that there are some explanatory texts on larger screens.

plurals
  1. POExt.NET changes to gridpanel unwanted rollback
    primarykey
    data
    text
    <p>Requirement: I implemented a function that deletes rows by clikcing on a button from my grid based on a value. My requirement is that the rows with status "Verwerkt", "Ter Fiattering", "Al verwerkt" are deleted from the grid and in codebehind I add a method that also deletes the records but from the database.</p> <p>Problem: The rows are deleted from the grid but they COME BACK after one/two seconds. Really weird. I got a warning about warningondirrty but I've canceled that message by turning it off in the store (WarningOnDirty = false). Help :)</p> <p>Gridpanel:</p> <pre><code>&lt;ext:Panel runat="server" ID="panel" Height="0"&gt; &lt;TopBar&gt; &lt;ext:Toolbar runat="server"&gt; &lt;Items&gt; &lt;ext:Button ID="btnHaalBatch" runat="server" Text="GBA synchroniseren" OnDirectClick="btnHaalBatch_Clicked" Icon="Add"&gt; &lt;/ext:Button&gt; &lt;ext:Button ID="btnVerwerkNAW" runat="server" Text="Verwerk" OnDirectClick="btnVerwerkNAW_Clicked" Icon="Tick"&gt; &lt;%--&lt;DirectEvents&gt; &lt;Click OnEvent="Wait"/&gt; &lt;/DirectEvents&gt;--%&gt; &lt;/ext:Button&gt; &lt;ext:ProgressBar ID="Progress1" runat="server" Width="300" Text="Initializing..." Hidden="true" /&gt; &lt;ext:Button ID="btnClearSelection" runat="server" Text="Mutatie(s) legen" Icon="Delete" OnDirectClick="btnClearSelection_Clicked"&gt; &lt;Listeners&gt; &lt;Click Handler="MutatieLegen(#{grid});" /&gt; &lt;/Listeners&gt; &lt;/ext:Button&gt; &lt;/Items&gt; &lt;/ext:Toolbar&gt; &lt;/TopBar&gt; &lt;/ext:Panel&gt; &lt;ext:ResourceManager ID="ResourceManager1" runat="server" /&gt; &lt;!-- Simple Array Grid --&gt; &lt;ext:GridPanel ID="grid" runat="server" Title="Wijzigingen" AutoWidth="true" AutoHeight="true" Padding="4" StripeRows="true" Draggable="false" Selectable="true" Icon="Application"&gt; &lt;Store&gt; &lt;ext:Store ID="Store1" runat="server" WarningOnDirty="false"&gt; &lt;Reader&gt; &lt;ext:ArrayReader&gt; &lt;Fields&gt; &lt;ext:RecordField Name="persoonID" Mapping="PersoonsId" /&gt; &lt;ext:RecordField Name="anummer" Mapping="Anummer" /&gt; &lt;ext:RecordField Name="bSNpersoon" Mapping="BSNpersoon" /&gt; &lt;ext:RecordField Name="type" Mapping="TypeWijziging" /&gt; &lt;ext:RecordField Name="datum" Mapping="DatumBinnenhalen" /&gt; &lt;ext:RecordField Name="omschrijving" Mapping="Omschrijving" /&gt; &lt;ext:RecordField Name="foutmelding" Mapping="Foutmelding" /&gt; &lt;/Fields&gt; &lt;/ext:ArrayReader&gt; &lt;/Reader&gt; &lt;/ext:Store&gt; &lt;/Store&gt; &lt;ColumnModel ID="ColumnModel1" runat="server"&gt; &lt;Columns&gt; &lt;ext:RowNumbererColumn /&gt; &lt;ext:Column DataIndex="persoonID" Header="Relatie nr." Width="100"&gt; &lt;/ext:Column&gt; &lt;ext:Column DataIndex="anummer" Header="A-nummer" Width="150"&gt; &lt;/ext:Column&gt; &lt;ext:Column DataIndex="bSNpersoon" Header="BSN" Width="150"&gt; &lt;/ext:Column&gt; &lt;ext:Column DataIndex="type" Header="Type wijziging" Width="150"&gt; &lt;/ext:Column&gt; &lt;ext:Column DataIndex="datum" Header="Datum synchroniseren" Width="200"&gt; &lt;/ext:Column&gt; &lt;ext:Column ColumnID="columnStatus" DataIndex="omschrijving" Header="Status" Width="130"&gt; &lt;Renderer Handler="return imgRenderer(value);" /&gt; &lt;/ext:Column&gt; &lt;ext:Column DataIndex="foutmelding" Header="Reden" Width="350"&gt; &lt;/ext:Column&gt; &lt;/Columns&gt; &lt;/ColumnModel&gt; &lt;SelectionModel&gt; &lt;ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="false" /&gt; &lt;/SelectionModel&gt; &lt;/ext:GridPanel&gt; </code></pre> <p>Function javascript client delete rows:</p> <pre><code>function MutatieLegen(grid) { var i = 0; //var store = Ext.getCmp("grid").getStore(); if (grid.store.getCount() &gt; 0) { for (i = grid.store.getCount() - 1; i &gt;= 0; i--) { var status = grid.store.getAt(i).data["omschrijving"]; if (status == "Verwerkt" || status == "Ter Fiattering" || status == "Al verwerkt") { grid.store.removeAt(i); } } } </code></pre> <p>Code behind:</p> <pre><code>protected void btnClearSelection_Clicked(Object sender, DirectEventArgs e) { // Code behind logic. call sql to delete rows where status == Verwerkt or Ter Fiattering or Al verwerkt } </code></pre>
    singulars
    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.
 

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