Deleting a row from a GridPanel techniques.

  1. #1

    Deleting a row from a GridPanel techniques.

    Since there seems to be many ways of deleting an item from a grid panel, I'm wondering what the preferred method might be.

    For example, I'm using a...

    commandbutton (javascript) on each row used to call a..
    directmethod confirm box (asp) that, when "ok" is clicked, calls a..
    delete function (javascript) that calls a..
    directmethod (asp) to delete the item in the database...
    and then reloads my gridpanel (javascript) after it's been deleted from the database.

    Just seems overly complicated, but it works. But perhaps there is an easier way of deleting a row from a gridpanel that I'm missing.

    Am I right in thinking that there is no need to remove the row via javascript manually when you only need to remove it from the database and then reload?
  2. #2
    The user might like to do different operations on current grid page, eg add a row, delete another and edit other details before posting to the server

    rgds /Peter
  3. #3
    Quote Originally Posted by plykkegaard View Post
    The user might like to do different operations on current grid page, eg add a row, delete another and edit other details before posting to the server

    rgds /Peter
    Not sure how to interpret that reply...but the situation I described above is one step, when you click a delete command button on a row, within a gridpanel. I'm talking about the steps in the code needed to delete an item in a database and rebuild/display the gridpanel in an optimal way.
  4. #4
    Ok I misinterpreted the first line in your post ;-)

    As an answer to your question have a look at the RESTful store sample
    https://examples1.ext.net/#/GridPanel/Restful/Overview/

    hth /Peter

Similar Threads

  1. [CLOSED] GridPanel - Context Menu (deleting gridpanel row)
    By digitek in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 27, 2012, 8:22 AM
  2. [CLOSED] deleting item in combo box
    By speedstepmem2 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 09, 2011, 6:03 PM
  3. Deleting row in GridPanel
    By HexElffilter in forum 1.x Help
    Replies: 9
    Last Post: Feb 25, 2011, 4:00 PM
  4. Replies: 2
    Last Post: Nov 18, 2008, 6:51 AM
  5. GridPanel Store and Deleting Records
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Sep 07, 2008, 12:18 PM

Posting Permissions