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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:21:40+00:00 2026-06-14T14:21:40+00:00

For getting selected row in grid, I use this: ‘#deleteWorkerButton’: { click: function(me, e,

  • 0

For getting selected row in grid, I use this:

'#deleteWorkerButton': {
                click: function(me, e, eOpts){
                    var grid = Ext.ComponentQuery.query('Worker')[0];
                    var selected = grid.getSelectionModel().getSelection()[0];

                    grid.getStore().remove(selected);
                }
            }

In my store, I have url for posting this JSON but when I use json_decode I get this:

object(stdClass) {
    id => "5";
    name => "tets";
    email => "era@sdfsa.com";
    phone => "test";
}

But I need array(), not stdClass.

This is my store:

Ext.define('Sabrina.store.Workers', {
    extend: 'Ext.data.Store',
    fields:['id', 'name', 'email', 'phone'],
    proxy: {
        type: 'ajax',
        api: {
            create  : 'php/usuarios.php?action=insert',
            read    : '../mega_sabrina_cake/workers/index',
            update  : 'php/usuarios.php?action=update',
            destroy : '../mega_sabrina_cake/workers/delete'
        },
        actionMethods: {
            create  : 'POST',
            read    : 'POST',
            update  : 'POST',
            destroy : 'POST'
        },
        reader: {
            type: 'json',
            root: 'Worker',
            rootProperty: 'Worker',
            successProperty: 'success',
            messageProperty: 'message'
        },
        writer: {
            type: 'json',
            writeAllFields: true,
            root: 'data',
            encode: true
        },
    },
    autoLoad: true,
    autoSync: true
});

So, I’m using this for DELETING data. What can I do with my store to get a “NORMAL” array when json_decode()?

I think the problem is in:

grid.getStore().remove(selected);
  • 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-14T14:21:41+00:00Added an answer on June 14, 2026 at 2:21 pm

    Just read the docs:

    mixed json_decode ( string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0 ]]] )
    […]
    assoc
    When TRUE, returned objects will be converted into associative arrays.

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

Sidebar

Related Questions

I have a question about getting data from selected grid row. This is the
I am want to change the color of selected row of grid (gwt-ext grid)
When a row has been selected, I am successfully getting selected row: var currentRow
From the code below I am getting a cell value from the selected row
I am having an issue getting the selected rows (GetSelectedRows()) on a DevEx grid
i need to retrieve the selected row info in my dataTable but i'm getting
I've got confusion of setting / getting selected indexes of combobox fields inside. this.Parameter.DataSource
I tried Dim theme = rblTheme.Items(rblTheme.SelectedIndex).Value getting first value selected Dim theme = rblTheme.SelectedItem.Value
Im getting a -1 value when i try to get the selected item position
Hi guys I keep getting an error no image selected when I try and

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.