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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:38:04+00:00 2026-06-09T16:38:04+00:00

I have a grid with checkboxselectionmodel. Here i have faced a problem, The delete

  • 0

I have a grid with checkboxselectionmodel. Here i have faced a problem, The delete button will be disabled when I am deselecting any of the selected record (still some records are selected). I need to make the delete button as enabled when any record is selected.
Here is the code I am used,

    function setDetail(action, r){
        switch (action) {
            case 'update':                                                  
                Ext.getCmp('delete').enable();
            break;
            default:
                Ext.getCmp('delete').disable();
            break;
        }
    };

    var checkboxselection = new Ext.grid.CheckboxSelectionModel({
      singleSelect: false,
      listeners: {
        'selectionchange' : function(sm) {

        },
        rowselect       : function(sm, i, r) {
            selectedRecord.idProperty = r.get('pos');
            setDetail('update', r);
        },

        rowdeselect     : function () {
            setDetail();
        }

      }
    });

Thankz in advance….

  • 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-09T16:38:05+00:00Added an answer on June 9, 2026 at 4:38 pm
        rowdeselect     : function () {
            setDetail();
        }
    

    This Part disables your delete button whenever you deselect even a single checkbox. The code is working fine. Your logic is wrong here. You can do this by maintaining a counter which changes based on every checkbox selection. (+1 if checked.. -1 if unchecked) and in your setDetail method based on the counter you can enable or disable your Delete button.

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

Sidebar

Related Questions

I have grid of images, when the mouse is over any given image a
I have grid which displays users information. I have commandColumn with edit, delete commands.
I have got @grid.GetHtml( tableStyle: grid, headerStyle: head, alternatingRowStyle: alt, rowStyle: row, selectedRowStyle: selected-row,
I have an ExtJs Grid with CheckBoxSelectionModel . Selecting the header checkbox checks all
I have an EditorGridPanel with a CheckboxSelectionModel. In the Ext.data.Source binded to this grid,
I have a Grid whose Rows & cols are populated dynamically. To delete a
I have a grid, there are: stackpanel, button and ~50% empty space. I need
I have grid of button. I want to a button to be clicked(invoke click
I have a grid view utilizing sql data source. Now I want to delete
I have a grid view which I am binding with data table. My problem

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.