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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:21:31+00:00 2026-05-18T06:21:31+00:00

I want to delete a row of my datagrid when someone click a button

  • 0

I want to delete a row of my datagrid when someone click a button part of that row located below Delete Column. I tried many different way one of those were to

<mx:DataGrid id="userGrid" dataProvider="{userGridData}" width="800" height="500" itemClick="userGrid_itemClickHandler(event)" creationComplete="userGrid_creationCompleteHandler(event)">
        <mx:columns>
            <mx:DataGridColumn headerText="ID" dataField="user_id" />

            <mx:DataGridColumn headerText="Email" dataField="user_email"/>

            <mx:DataGridColumn headerText="Delete" itemRenderer="ev.renderers.UserGridDelete" id="deleteCol"/>
            <mx:DataGridColumn headerText="Edit" itemRenderer="ev.renderers.UserGridEditRender"/>

        </mx:columns>
    </mx:DataGrid>

The item render ev.renderers.UserGridEditRender has a delete button listing for click event it basically do userGridData.removeItemAt(userGrid.selectedIndex);
(UserGridData = Data provider of grid with id “userGrid”)
But whenever I click the button an exception is throw

RangeError: Index '-1' specified is out of bounds.
  • 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-18T06:21:31+00:00Added an answer on May 18, 2026 at 6:21 am

    How about having your item renderer button dispatch an event that has the selected “data” in it.

    dispatchEvent( new DataMonkeyEvent(DataMonkeyEvent.DELETE_ROW, this.data) );  //where "this" is the button and the event should bubble.
    

    listen for that event in the outer document and edit your userGridData accordingly… invalidateList() if you are not using in-house extended dataproviders that listen for children changed jive.

    Hope that helps. –jeremy

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

Sidebar

Related Questions

I have several dataframes in which I want to delete each row that matches
I want to delete row in SQL database when a column value matches with
I have a DataGrid where each row has a delete button. If I set
I want to delete rows from a table that has a column more than
I want to delete row from datagridview when user clicks the delete button.The datagridview
I want to delete a row in the grid, but the grid always post's
I want to delete some data displayed in a HTML table row (first on
i want to delete a row and cascade all foreign keys in hibernate i
I have a data table and I want to delete a row here is
I have a WPF DataGrid that I want to be able to Update, Insert

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.