Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Delete a row from a table in parse.com

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 317
    Comment on it

     

    Hello,

    It is very simple to delete an item or row from any parse table from the code.

    First, we need to create the object of the table that points that particular row and then delete it.

    I create an object using object id and then execute delete() method of the parse.

    Below is the code


     

    ParseQuery<ParseObject> query = ParseQuery.getQuery("Table_Name");
                                    query.getInBackground("our_object_id", new GetCallback<ParseObject>() {
                                        public void done(ParseObject object, ParseException e) {
                                            if (e == null) {
                                                try {
                                                    object.delete();
                                                    Toast.makeText(getActivity(),"Video deleted successfully.",Toast.LENGTH_LONG).show();
                                                    gettingListVideos();
                                                } catch (ParseException e1) {
                                                    e1.printStackTrace();
                                                }
                                                PitchLogger.createLog("pos( " + object.get("position"));
                                            } else {
                                                PitchLogger.createLog("Error " + e.getMessage());
                                            }
                                        }
                                    });

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: