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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:31:26+00:00 2026-06-03T22:31:26+00:00

I am trying to count the selected checkboxes in ext js. How do I

  • 0

I am trying to count the selected checkboxes in ext js.

How do I count the selected checkbox and display them in a area shownbelow in the image.

Thanks
enter image description here

  • 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-03T22:31:27+00:00Added an answer on June 3, 2026 at 10:31 pm

    I’m agree with sha. Here it is a practical example:

    var index = 0;
    
    var changeCounter = function (cb, nv, ov) {
      if (nv) index++;
      else index--;
    }
    Ext.create('Ext.form.Panel', {
      bodyPadding: 10,
      width: 300,
      title: 'Pizza Order',
      items: [
        {
            xtype: 'fieldcontainer',
            fieldLabel: 'Toppings',
            defaultType: 'checkboxfield',
            items: [
                {
                    boxLabel  : 'Anchovies',
                    name      : 'topping',
                    inputValue: '1',
                    id        : 'checkbox1' ,
                    listeners: {
                        change: changeCounter
                    }
                }, {
                    boxLabel  : 'Artichoke Hearts',
                    name      : 'topping',
                    inputValue: '2',
                    id        : 'checkbox2' ,
                    listeners: {
                        change: changeCounter
                    }
                }, {
                    boxLabel  : 'Bacon',
                    name      : 'topping',
                    inputValue: '3',
                    id        : 'checkbox3' ,
                    listeners: {
                        change: changeCounter
                    }
                }
            ]
        }
    ],
    bbar: [
        {
            text: 'Get Counter' ,
            handler: function () {
                alert (index);
            }
        } ,
        {
            text: 'Select Bacon',
            handler: function() {
                Ext.getCmp('checkbox3').setValue(true);
            }
        },
        '-',
        {
            text: 'Select All',
            handler: function() {
                Ext.getCmp('checkbox1').setValue(true);
                Ext.getCmp('checkbox2').setValue(true);
                Ext.getCmp('checkbox3').setValue(true);
            }
        },
        {
            text: 'Deselect All',
            handler: function() {
                Ext.getCmp('checkbox1').setValue(false);
                Ext.getCmp('checkbox2').setValue(false);
                Ext.getCmp('checkbox3').setValue(false);
            }
        }
    ],
    renderTo: Ext.getBody()
    });
    

    Just take this code, go to ExtJS API Doc for Checkbox and replace the example code with the above: then, push preview and click on the button ‘Get Counter’.
    It does exactly what sha said.

    Ciao

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

Sidebar

Related Questions

Am trying to get the count of how many check boxes are selected and
I'm trying to export only the selected checkbox items on a datagridview. The current
Using this code I am trying to resize the selected image and then want
What I'm trying to get is to count which checkboxes in article list are
I am trying to determine if a selected range is within a set area...
I'm trying to count the number of rows selected from a table by using
Currently I am trying to check a selected Item Id and display in dropdown
Trying to count how many elements within the array are not equal to 0,
I'm trying to count how many distinct value of FLOOR there is but I
I'm trying to count the number of records that have a null DateTime value.

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.