Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3440340
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:25:14+00:00 2026-05-18T08:25:14+00:00

When I press a grid’s delete button, the row disappears from the grid but

  • 0

When I press a grid’s delete button, the row disappears from the grid but when grid is reloaded that row reappears. I tried a lot of commands with no results. Please help!
Thanks in advance.

This is the function that creates the grid:

// create the data store
var store = new Ext.data.Store({
    proxy: new Ext.ux.data.PagingMemoryProxy(myData),
    remoteSort:true,
    sortInfo: {field:'del', direction:'DESC'},

    reader: new Ext.data.ArrayReader({
        fields: [
           {name: 'id'},
           {name: 'name'},
           {name: 'category'},
           {name: 'price', type: 'float'},
           {name: 'active', type: 'int'},
           {name: 'actions', type:'text'}
        ]
    })
});

And here is the remove function:

        buttons: [{
        text: 'Add',
        iconCls: 'silk-add',
        handler: this.onAdd

    }, '-', {
        text: 'Delete',
        iconCls: 'silk-delete',
                   handler: function(sm, rowIdx,r){

            var s = grid.getSelectionModel().getSelections();
            for(var i = 0, r; r = s[i]; i++){

              // store.remove(r);
               var index = store.data.indexOf(r);
               if(index > -1){
                r.join(null);
                store.data.removeAt(index);

            }
                store.modified.remove(r);

            if(index > -1){
                store.fireEvent('remove', store, r, index);     
            } 
                store.destroyRecord(store, r, index);
            }

           store.reload();
        },
    }]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:25:15+00:00Added an answer on May 18, 2026 at 8:25 am

    When you reload the grid using the grid.store.reload() method the store is going to reload the data from the source, so in this case it looks like you are using local data (an array or json string?). So yes, you are deleting the record from the store, but then by calling reload you are reinserting those records. Your best bet is to do something where you delete the values out of the object “mydata” and then call reload. That should get rid of the records for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a JQGrid grid, when you select a row and press the edit button,
I have a grid and a button. I want to be able to press
I tried: void read_grid_from_file( int** grid, const size_t row, const size_t column, FILE* inf
I have a component that inherits from JPanel, I draw a grid on it.
I want to try out building a simple grid that has a delete column,
from TKinter import * class Ui(Frame): def __init__(self) Frame.__init__(self, None) self.grid() bquit=Button(self, text=Quit, command=self.quit_pressed)
If I press Ctrl + B that ought to give me ASCII code 2,
when I press the Maximize button on my WPF app, all the controls therein
When I press F5, everything compiles fine, but when the app is to be
I have a Devexpress Gridview that is linked to a delete, fetch and update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.