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

  • Home
  • SEARCH
  • 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 6844497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:23:09+00:00 2026-05-27T00:23:09+00:00

I am creating a grid panel and want to attach an event with each

  • 0

I am creating a grid panel and want to attach an event with each row. following is my code

var locationdata  = Ext.create('Ext.data.Store', {
    fields:['name'],
    storeId:'simpsonsStore',
    data:{'items':[
                { 'name': 'Lisa'}
            ]},
         proxy: {
             type: 'memory',
             reader: {
                 type: 'json',
                 root: 'items'
             }
         }

});

hintBox = Ext.create('Ext.grid.Panel', {
    title: 'Location List',
    store: locationdata,
    columns: [
        { header: 'Name',  dataIndex: 'name' , flex:1 }
    ],
    flex: 5
});
hintBox.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
     alert("row selected");
});

I am adding hintBox in anothor panel which is rendered to body.

What is wrong with this 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-05-27T00:23:09+00:00Added an answer on May 27, 2026 at 12:23 am

    Selection model has no event ‘rowselect’, In Extjs 4 selectiom model has only selectionchange event.

    hintBox.getSelectionModel().on('selectionchange', function(sm, selectedRows, opts) {
          //selected rows is an array of models and if you want just one row selected,
          //you have to config the grid so it only accepts one selection i think is selType: 'SINGLE' or 'SIMPLE'
          // and after that selectedRows[0] will be the selected row
          alert("rows selected");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code that I creating a grid var store = Ext.create('Ext.data.ArrayStore', {
I'm creating a grid based game in Java and I want to implement game
I'm creating a building game in JavaScript and PHP that involves a grid. Each
I have been following this nice walkthrough for creating a grid using MVC contrib.
Here's a snippet of code, inserted immediately after creating my grid, that worked fine
I am creating Grid elements dynamically onto a stack panel. When an object is
I am creating a Attendance System and using grid view to insert the data.
I have the following code (only relevant snippets) <ribbon:RibbonWindow .............> <Grid> <ribbon:Ribbon> <ribbon:RibbonToggleButton x:Name=Button2
Trying to use pil for creating grid-like layout from images. But that code only
I'm creating a dojox.grid.DataGrid in dojo 1.6 with the following notation: <table dojoType=dojox.grid.DataGrid> <thead>

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.