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 9124193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:31:07+00:00 2026-06-17T06:31:07+00:00

Using ExtJs4.1 on Sencha Architect. I have following code in my onDeleteButton code onDeleteButtonClick:

  • 0

Using ExtJs4.1 on Sencha Architect.

I have following code in my onDeleteButton code

onDeleteButtonClick: function(button, e, options) {
     var active = this.activeRecord;
     var myGrid = Ext.getCmp('publisherResultsGridView'),
         sm = myGrid.getSelectionModel(),
         selection = sm.getSelection(); // gives you a array of records(models)

     if (selection.length > 0){
            for( var i = 0; i < selection.length; i++) {
                            this.application.log('OnDeleteItemID is ' + selection);
            }
            this.remove(selection);
     }

Code for Remove Function

remove: function(record) {
        var store = Ext.getStore('PublisherProperties');
        store.proxy.url = MasterDataManager.globals.url + "Publishers/";
        store.remove(record);
        store.sync();

When I run it, I could see an array of objects in my log, also I dont get any errors after the remove function is executed. But the store doesnt update, I mean it doesnt remove the selected items.

Can somebody please help me.

Thanks

  • 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-06-17T06:31:08+00:00Added an answer on June 17, 2026 at 6:31 am

    I solved my problem by making the following changes.

    To onDeleteButtonClick

    if (selection.length > 0){
                    for( var i = 0; i < selection.length; i++) {
                                    this.application.log('OnDeleteItemID is ' + selection[i].data.id);
                                    this.remove(selection[i]);
                    }
    
             }
    

    To Remove function

    remove: function(record) {
        var store = Ext.getStore('PublisherProperties');
        this.application.log('Remove Function is ' + record);
        store.proxy.url = MasterDataManager.globals.url + "Publishers/" + record.data.id;
        store.load({
                            scope : this,
                            callback : function(records, operation, success){
                                if (records.length > 0){
                                    var store2 = Ext.getStore('PublisherProperties');
                                            store2.proxy.url = MasterDataManager.globals.url + "Publishers/";
                                            store2.remove(records[0]);
                                            store2.sync();
                                 }
                            }
                });
        //store.remove(record);
        //store.sync();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Sencha Architect with Extjs 4 and by following the basic example
I'm using the Sencha ExtJS Framework in Version 4.05 and i have the following
im using extjs4 with dwr3 to upload a file this is all i have
I am using Extjs 4 in Sencha Architect. I have 2 buttons when I
Im using Ext.apply(obj1,configobject) in Extjs4; let us consider this sample example : var obj1
I have an extjs4 panel created using this config object. { title : 'Messages',
We've just started using Sencha's ExtJS 4 in our project and have been following
I am using ExtJS 4. I have created a tree panel as var treeStore
I'm using Sencha Architect 2 to create an application. I've run into an issue
I am using EXTJS4. I have a tree which displays classes (classname) on one

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.