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

The Archive Base Latest Questions

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

Hy there, I have a very basic example with a grid with only 1

  • 0

Hy there,

I have a very basic example with a grid with only 1 item and a button which updates this entry with the set-method of the underlying record.

The problem is, that if the item is selected at the time the record gets updated by pressing the button, the selection gets removed and it’s not possible to select it anymore afterwards.

Working example: http://jsfiddle.net/fu2Xq/2/

Ext.onReady(function() {
    var personsGrid = Ext.create('Ext.grid.Panel', {
        width: 150,
        height: 100,
        renderTo: Ext.getBody(),

        store: Ext.create('Ext.data.Store', {
            fields: [ 'name' ],
            data: [{ name: 'Stephen' }]
        }),

        columns: [{ text: 'Name', dataIndex: 'name', flex: 1 }],
    });

    var txtField = Ext.create('Ext.form.field.Text', {
        fieldLabel: 'New name',
        labelWidth: 70,
        width: 150,
        value: 'Alex',
        renderTo: Ext.getBody()
    });

    Ext.create('Ext.button.Button', {
        text: 'Rename person',
        width: 150,
        renderTo: Ext.getBody(),
        handler: function() {
            var rec = personsGrid.getStore().getAt(0);

            rec.set('name', txtField.getValue());
        }
    });
});

Seems like a bug to me because after reordering the name-column the selection reappears…

I’d really appreciate some comment on this!

Thanks


edit: reformated some code…

  • 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:24:51+00:00Added an answer on June 17, 2026 at 6:24 am

    It’s a bug in ExtJS 4.1.1 which seems to be solved in 4.1.3 and can be worked around by calling the refresh-method of the grid’s view after updating the record:

    http://jsfiddle.net/fu2Xq/7/

    handler: function() {
        var rec = personsGrid.getStore().getAt(0);
    
        rec.set('name', txtField.getValue());  
        personsGrid.getView().refresh();
    }
    

    I got this answer from the Sencha forum:
    http://www.sencha.com/forum/showthread.php?253287-Item-in-grid-is-deselected-after-record-has-been-modified-with-set-method&p=928197&viewfull=1#post928197

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

Sidebar

Related Questions

Im sure there is a very simple solution for this. I have a bunch
I have a method that effectively takes a string. However, there is a very
Here's a very basic question I have. In my professor's lecture slide, there is
I have written a very basic crawler which scrapes product information from websites to
I have a very theoretical question: Is there a way to ban the use
Is there any batch script compiler available? I have a very big batch file
I have developed an AJAX based game where there is a bug caused (very
A very simple question. I have a html page which is divided into three
There have been proposals for C++ delegates which have lower overhead than boost::function :
I have an ASP.NET app, very basic, but right now too much code to

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.