Callback for the delete button in a UITableViewCell

Hi, I have set a UITableView to be in edit mode, and each cell has a round red circle next to each cell, and when pressed the red Delete button appears in the cell, but when this button is pressed, nothing happens. I've looked at these delegates for events, but nothing seems to happen in theses:
- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath
- (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath
I've also tried setting the UITableViewCell editAction and target properties without success.

Hi,
I'm trying to use different callbacks through the "editAction" property in a UITableViewCell and it doesn't seem to fire. What I'm doing is, from my ViewController I set
cell.target = self;
cell.editAction = @selector(myEditAction:);
and then my view controller implements
- (IBAction)myEditAction:(UITableViewCell *)cell;
I CAN use
tableView:commitEditingStyle:forRowAtIndexPath:
but that's not what I want.
Any ideas?

Similar Messages

  • Unable to get CommandAgrument value for the Edit Button in Gridview Control, Mean while it works for the Delete Button

    I want to show Edit/Delete Button using Ajax's HoverMenuExtender Control , But I also want to show edited record using ModalPopup Extender Control of AjaxCotrolltoolkit , for this I have used below code
    <asp:GridView ID="GridMainCat" runat="server" Width="100%" AutoGenerateColumns="false" DataKeyNames="CATID" OnRowDataBound="GridMainCat_RowDataBound" OnRowCommand="GridMainCat_RowCommand" OnPageIndexChanging="GridMainCat_PageIndexChanging" OnSelectedIndexChanging="GridMainCat_SelectedIndexChanging" AllowPaging="true" PageSize="10">
    <Columns>
    <asp:TemplateField>
    <HeaderTemplate>
    <table width="100%" border="1" style="color: blue;">
    <tr>
    <td width="20%">Catg Id</td>
    <td width="20%">Catg Name</td>
    <td width="25%">Catg Desc</td>
    <td width="35%">Catg Image</td>
    <%-- <td width="20%">Created Date</td>--%>
    </tr>
    </table>
    </HeaderTemplate>
    <ItemTemplate>
    <asp:Panel ID="panel2" runat="server">
    <table width="100%">
    <tr>
    <td width="20%"><%#Eval("CATID") %></td>
    <td width="20%"><%#Eval("CATNAME") %></td>
    <td width="25%"><%#Eval("CATDESC") %></td>
    <td width="35%"><%#Eval("CATIMAGE") %></td>
    <%-- <td width="20%"><%#Eval("CREATEDADTE") %></td>--%>
    </tr>
    </table>
    </asp:Panel>
    <!-----Panel for displaying the edit and delete options in GridView------>
    <asp:Panel ID="panel1" CssClass="HoverMenu"
    runat="server" Height="50" Width="50"
    HorizontalAlign="Left">
    <div>
    <asp:LinkButton Style="padding: 4px;" ID="lnkDel"
    CommandName="Dlt" runat="server" CausesValidation="false" Text="Delete" CommandArgument='<%#Bind("CATID") %>' OnClientClick="javascript:return('Are you sure, do you want to delete Record??')">
    </asp:LinkButton><br />
    <asp:LinkButton ID="lnkEdit" runat="server" Text="Edit" CausesValidation="false" CommandName="Edt" CommandArgument='<%#Bind("CATID") %>' style="padding: 4px;" ></asp:LinkButton>
    </div>
    </asp:Panel>
    <asp:HoverMenuExtender ID="HoverMenuExtender1" runat="server" TargetControlID="panel2" PopupControlID="panel1" PopupPosition="Left" HoverCssClass="Hover"></asp:HoverMenuExtender>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    To Show ModalPopup I have used following aspx Code:-
    <asp:Button ID="btnShowPopup" runat="server" Style="display: none" CausesValidation="false" />
    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnShowPopup" PopupControlID="PanelEditMainCategory" CancelControlID="btnUpdate" BackgroundCssClass="modalBackground"></asp:ModalPopupExtender>
    <asp:Panel ID="PanelEditMainCategory" runat="server" CssClass="modalPopup" Style="display: none;">
    <table style="border-width: 3px; border-color: lightseagreen;" border="1" align="center" height="300px">
    <tr>
    <th>
    <table>
    <tr>
    <th align="left">Category Id:</th>
    </tr>
    <tr>
    <th align="left">Category Name:</th>
    </tr>
    <tr>
    <th align="left">Category Description:</th>
    </tr>
    <tr>
    <th align="left">Category Image:</th>
    </tr>
    </table>
    </th>
    <td>
    <table>
    <tr>
    <td align="left">
    <asp:TextBox ID="txtCatID" Text='<%#Eval("CATID") %>' runat="server" Enabled="false"></asp:TextBox>
    </td>
    </tr>
    <tr>
    <td align="left">
    <asp:TextBox ID="txtCatName" Text='<%#Eval("CATNAME") %>' runat="server"></asp:TextBox>
    </td>
    </tr>
    <tr>
    <td align="left">
    <asp:TextBox ID="txtCatDesc" runat="server" Text='<%#Eval("CATDESC") %>' TextMode="MultiLine"></asp:TextBox>
    </td>
    </tr>
    <tr>
    <td align="left">
    <asp:TextBox ID="txtCatImage" runat="server" Text='<%#Eval("CATIMAGE") %>'></asp:TextBox>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <th align="left" colspan="2">
    <asp:Button ID="btnUpdate" Text="Update" CausesValidation="false" runat="server" OnClick="btnUpdate_Click" />&nbsp;
    <asp:Button ID="btnCancel" Text="Cancel" CausesValidation="false" runat="server" OnClick="btnCancel_Click" />
    </th>
    </tr>
    <tr>
    <th align="left"></th>
    <td align="left"></td>
    </tr>
    </table>
    </asp:Panel>
    Here is my .CS code :-
    protected void GridMainCat_RowCommand(object sender, GridViewCommandEventArgs e)
    catID = e.CommandArgument.ToString();
    if (e.CommandName == "Edt" && e.CommandArgument != null)
    ModalPopupExtender1.Show();
    Bind_Edit_MainCategory(catID);
    if (e.CommandName == "Dlt")
    Bind_Delete_MainCategory(catID);
    private void Bind_Grid_MainCategory()
    using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["conStr"].ConnectionString))
    using (SqlCommand cmd = new SqlCommand("USP_FETCH_MAINCATEGORY", cn))
    try
    cmd.CommandType = CommandType.StoredProcedure;
    dt = new DataTable();
    da = new SqlDataAdapter(cmd);
    da.Fill(dt);
    GridMainCat.DataSource = dt;
    GridMainCat.DataBind();
    catch (Exception ex)
    throw ex;
    private void Bind_Delete_MainCategory(string catId)
    using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["conStr"].ConnectionString))
    using (SqlCommand cmd = new SqlCommand("USP_DELETE_MAINCATEGORY", cn))
    try
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.AddWithValue("@CATID", catId);
    cn.Open();
    cmd.ExecuteNonQuery();
    Bind_Grid_MainCategory();
    catch (Exception ex)
    throw ex;
    private void Bind_Edit_MainCategory(string catid)
    using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["conStr"].ConnectionString))
    using (SqlCommand cmd = new SqlCommand("USP_EDIT_MAINCATEGORY", cn))
    try
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.AddWithValue("@CATID", catid);
    cn.Open();
    SqlDataReader dr = cmd.ExecuteReader();
    if (dr.Read())
    txtCatID.Text = dr["CATID"].ToString();
    txtCatName.Text = dr["CATNAME"].ToString();
    txtCatDesc.Text = dr["CATDESC"].ToString();
    txtCatImage.Text = dr["CATIMAGE"].ToString();
    //modalPopupExtender1.Show();
    ModalPopupExtender1.Show();
    Bind_Grid_MainCategory();
    catch (Exception ex)
    throw ex;
    it works fine for HoverMenu Extender, and for the delete button as well. When I click on Delete Button It finds CommandArgument value But as I click on Edit Button It does not find CommandArguement value. Kindly help me to fix this problem

    Do you mean it's firing when you click Edit?. I've replicated your code as below and it worked, try to remove the OnRowCommand run a build and then add the it again:
    protected void Page_Load(object sender, EventArgs e)
    BindGridwithDummy();
    protected void GridMainCat_RowCommand(object sender, GridViewCommandEventArgs e)
    string catID = e.CommandArgument.ToString();
    if (e.CommandName == "Edt" && e.CommandArgument != null)
    if (e.CommandName == "Dlt")
    private void BindGridwithDummy()
    DataTable dt = new DataTable();
    DataRow dr;
    dt.Columns.Add(new System.Data.DataColumn("Test", typeof(String)));
    dr = dt.NewRow();
    dr[0] = "A dummy Data"; //Adds the Dummy Data in the Row
    dt.Rows.Add(dr);
    // Show the DataTable values in the GridView
    GridView1.DataSource = dt;
    GridView1.DataBind();
    <asp:GridView ID="GridView1" runat="server" OnRowCommand="GridMainCat_RowCommand">
    <Columns>
    <asp:BoundField DataField="Test" />
    <asp:TemplateField>
    <HeaderTemplate>
    Button</HeaderTemplate>
    <ItemTemplate>
    <asp:LinkButton Style="padding: 4px;" ID="lnkDel" CommandName="Dlt" runat="server"
    CausesValidation="false" Text="Delete" CommandArgument="1" OnClientClick="javascript:return('Are you sure, do you want to delete Record??')"></asp:LinkButton><br />
    <asp:LinkButton ID="lnkEdit" runat="server" Text="Edit" CausesValidation="false"
    CommandName="Edt" CommandArgument="2" Style="padding: 4px;"></asp:LinkButton>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>

  • How can I delete bookmarks on my toolbar when the 'bluestar' isn't illuminated? (Same for the 'delete' button in the library menu).

    Dear Sir/Madam
    I have had a look at your solutions page and have tried to use all the advice suggested however, when I try to delete three items on by Toolbar, none of them illuminate the 'BlueStar' which is beside their address. (I have successfully got rid of other items). I have also tried to delete the items in Firefox's library menu, however, the delete button their isn't illuminated either. I am now concerned that the items are spyware. I was thinking of reinstalling the software but, this would mean loosing all my Bookmarks.
    For your information, I have just updated Firefox to 28.0.
    I would appreciate your help with this matter.
    Kind regards
    Suzanne

    Dear sludge7051-x
    Thank you so much for all your help.
    I did as you said (after trying to find a very old mouse in my computer box in the attic!), and managed to delete the offending tags.
    Really appreciate your prompt response to my problem.
    Have a lovely weekend.
    Kind regards

  • Placing the delete button at different position

    Hello all,
    I need to place the delete button at some other place(to the right side of the assignment block) . please help me on this
    REGARDS
    CHANDRAKANT KULKARNI

    Dear Chandrakant,
    There is no way to do that. Please note that all the remaining buttons come under MORE button because there is not enough space in the toolbar to place all these buttons on the top. If you still want to see DELETE button beyond MORE button, you might have to delete some options in the MORE button and make some space available for the DELETE button to be placed there. You'll also see that MORE option has been removed and all you'll see those options available in MORE being displayed as distinct buttons.
    Hope this helps.
    Thanks
    Vishal

  • My Wireless mac keypad has stopped properly working. The keys sometime do not correspond to the result, or a a simultaneous duel actio, for example when the delete button is pressed the. Ursor does go backwards, but it also turns the sound up. Any ideas?

    My Wireless mac keypad has stopped properly working. The keys sometime do not correspond to the result, or a a simultaneous duel actio, for example when the delete button is pressed the. Ursor does go backwards, but it also turns the sound up. The keyboard is properly connected to the computer, and the battery life is up in the nineties.
    Help please !!!!

    Hi, thankyou for your response. Can I just confirm that you mean turning the computer on and off again, or re-booting the whole system. If it is the first I have already turned the system on and off, with no luck.
    Regards

  • Where is the delete button on iphone 4 for the removal of photographs /

    Can anyone tell me where the delete button is for removal of photographs on iphone 4 ?

    For photos in your camera roll, photo stream and other photos in folders you created on the camera, select the photo, the select the trash can icon below it.
    For photos you synced to your camera from your computer, you have to deselect the photo on the computer and sync again.

  • HT201436 voice mail management is really bad with the newer version of software for my iPhone5  my old version deleted VMs instantly but now my phone freezes up and at times the delete button does not work until i set the phone aside for up to a minute.

    I am having a hard time deleting unwanted voice messages with my new phone and software as compare to my iphone4 which was as easy as clicking on the delete button.  VMs would delete instantly.  with my iPhone 5 7.0.4 software ver the first one or two delete immediately then the phone freezes up for several seconds making the process frustrating.  I am wondering if either I am doing something wrong or if there is a fix out there.  its a giant step backwards for Apple.

    I am having a hard time deleting unwanted voice messages with my new phone and software as compare to my iphone4 which was as easy as clicking on the delete button.  VMs would delete instantly.  with my iPhone 5 7.0.4 software ver the first one or two delete immediately then the phone freezes up for several seconds making the process frustrating.  I am wondering if either I am doing something wrong or if there is a fix out there.  its a giant step backwards for Apple.

  • How to hide/remove the 'Delete' button for a particular role

    We have a role that can only Create and Edit the Accounts, Contacts, Opportunities, & Leads. So I modified the Default and Owner Access Profiles for that role and changed the Access Level to 'Read/Edit' for each of the above mentioned Record Types.
    When the user is logged with this role they can see the 'Delete' button on all the Record Types. When they click on the 'Delete' button they get the 'Access Denied' message. Thats fine, but how do you hide/remove the 'Delete' button for this role so they don't try to click it.

    At this time it is not possible to hide/remove the "Delete" button. This functionality is on the roadmap.

  • HT4101 I discovered a fatal flaw in the iPad procedure for downloading images from camera to iPad: after selecting the images to be downloaded, an accidental touch of the "delete" button, wipes all selected images from the camera, with no warning?

    After downloading some 60 images from camera to iPad, I was "scrolling" down to select the last images, and inadvertently touched the "Delete" button that appears at the top right of the screen, when the "Select" option is chosen. I did not notice the warning "Delete 60 Images?", and continued scrolling down, when my finger touched the warning message. All my precious images were instantly deleted from the camera The sensitive touch screen feature makes this a real problem. Apple should "fix" this unacceptable feature, surely! I suggest that the images on the camera memory card should not be able to be deleted from the iPad, and this shpuld require to be done using the camera controls only. Similarly, the "Delete" or "Keep" options that appear after importing a selection from the camera, should NOT allow the images on rthe camera to be deleted, but only the imported (downloaded) images on the iPad. This unnecessary option could easily delete precious images from the camera!
    Apple should remove the option to delete images from the camera, and the iPad touch screen commands should olny delete images on the iPad. (Alternatively, the "delete option should be on a separatly accessed "page".)
    Surely enough users of the "Lightning to USB Camera Adapter" will agree with the above?

    No, I don't agree. Whenever you connect a camera to a computer you are given the opportunity to delete the photos on the camera after downloading in precisely the same way the iPad does this. The fact that you touched Delete and then ignored the Warning doesn't change anything.
    I've loaded thousands of photos on my IPad and never have had that problem.
    Don't blame a moment of carelessness on your device.
    If you want to make such a suggestion to Apple use http://apple.com/feedback

  • About a month ago a song randomly appeared in my songs list and when I tried swiping to the left to delete the song it wouldn't slide over to show the delete button. The delete slide appears with all of my other songs except that one. P.S. iCloud is off.

    About a month ago a song randomly appeared in my songs list and when I tried swiping to the left to delete the song it wouldn't slide over to show the delete button. The delete slide appears with all of my other songs except that one. The ICloud songs are turned off and it wasn't iTunes Radio. 2 more songs like this have appeared and I can't delete them from both my iPhone or my computer (they don't even show up on my computer). If somebody knows how to fix this that would be amazing! Thank You.

    Have you:
    - Restore from backup. See:                                                
    iOS: Back up and restore your iOS device with iCloud or iTunes
      - Restore to factory settings/new iOS device.            
    If a PC
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8

  • HOWTO: Hide the delete button in a NavigatorBar

    HOWTO: Hide the delete button in a NavigatorBar (JSP)
    Goal: Hide the delete button in a NavigatorBar or JSNavigatorBar Data Web Bean. This example works for either bean.
    Solution: Edit the .jsp file containing your NavigatorBar bean. For a generated BC4J JSP application, the file is YourView_Top.jsp.
    Find the code that instantiates the NavigatorBar. It will look something like:
    <jsp:useBean class="oracle.jbo.html.databeans.NavigatorBar" id="tb" scope="request">
    <%
    tb.initialize(pageContext, "MyProject1_bizcomp_BizcompModule.MyView");At this point, add the following line of code to hide the delete button:
    tb.getButton(tb.NAVIGATE_DELETE).setButtonVisible(false);You can find the variable names for the other navigator buttons in the javadoc for oracle.jbo.html.databeans.BaseNavigatorBar. In the online help, this is under Reference -> Business Components Reference.
    null

    Georges,
    This has come up before, and after some experimentation, there's not a straightforward way to do it.
    There are two possible solutions that I can think of:
    1. Write your own custom bean and/or extend the beans provided to modify them to your needs.
    2. Wait for the 3.2 release at the end of the month. This release provides custom data tags with much finer grained control over specific items such as the buttons.
    I think 2 is preferable, if you have the time to wait.

  • Mac OS 10.6.8.  In address book I have tried to delete some groups (created when I created an account in mail which I then subsequently deleted).  However in address book edit the delete button is greyed out.

    I cannot delete groups in address book because the delete button is greyed out.  I have deleted the original mail accounts which created the address book.  I could just leave the groups there but the problem it creates is that address book tries to connect to the relevant server every time I open mail, then I get various error messages because it cannot connect.  Thanks for any assistance.

    I found this link for a similar problem someone had with a Lotus Notes account. I used it to resolve my issue with a different email account (basically followed the same steps, and then looked for the particular account I needed to delete)... hope it helps!
    http://aumja24-usa.blogspot.com/2010/10/iphone-removing-lotus-notes-traveler.htm l

  • Both the 'delete' button and in the menu options do not delete messages but change them to unread. How can I remedy this?

    The delete function seems to no longer work in Thunderbird. Both the 'delete' button and in the menu options do not delete messages but change them to unread.
    I have tried to fix it by deleting the trash / deleted files as suggested in another thread but it made no difference. The delete key still works to delete things outside of Thunderbird (including here for example).
    I have not uninstalled / reinstalled. I have rebooted a couple of times and it hasn't made any difference.
    I did go through and delete a huge number of old emails a few days ago, but I have cleared out the Deleted folders and it made no difference.
    All suggestions appreciated.

    Right click on any of the other right panel headers  in Slideshow module to open the context menu. You should be able to reactivate the Options panel from there.

  • HT4053 How do I delete photos, the delete button does not appear to be working?

    I have downloaded all my photos to my new IPad. I need to delete some I do not want, how do I do it. The delete button does not appear to be working?

    I personally don't know of any other software that does syncing, however, you can use another cloud service like Dropbox or Flikr to house your photos, add and delete them and have them available for viewing on any device or comuter that has an internet connection.
    I'm not sure why you would be having trouble not getting photos that you put into your Photo Stream Uploads folder on your iPad. Photo Stream is Photo Stream. Also, just so you know, photo management and Photo Stream have nothing to do with iTunes. Photo management on the computer is done through your photos folder and app (on a Mac, it's iPhoto). You only use iTunes to tell the sync process which items to retrieve and sync from that library. Photo Stream is completely independent of iTunes altogether.
    If you want to get photos from a camera to your iPad without having to use a computer, get a camera connection kit which will allow you to physically hook the camera to the iPad, and to directly download the photos from the camera to the iPad.
    You would still want to also hook the camera up to the computer to back those photos up to your photo library on your computer.
    Also you might want to look into purchasing (for under $5) iPhoto for your iPad:
    https://itunes.apple.com/us/app/iphoto/id497786065?mt=8
    Seems like you might benefit from talking to your local Apple Store about when they might have some sessions for learning photo management and sharing between your device and computer, because what you appear to be wanting to do is all do-able. I guess I'm just missing what your issue is. You can many things with photos on your iPad, however, your device will never be a substitue for your computer for backing up and managing your photos.
    So, best of luck, I hope one of the suggestions above will help you to achieve what you are trying to do.
    Cheers,
    GB

  • Can not take a screenshot with Maverick and track pad.  can not use apple chat to talk with a tech.  there are other issues also like I used to be able to go back a page with the delete button.  No Maverick PDF to instruct on how to use Maverick

    Can not take a screenshot with Maverick and track pad.  can not use apple chat to talk with a tech.  there are other issues also like I used to be able to go back a page with the delete button.  No Maverick PDF to instruct on how to use Maverick
    THE use of the apple support is a mess also.
    I want to be able to use my MAC fully and easily like I used to with Snow Leopard. 
    What is wrong with this maverick OS?

    The only people who can possibly assist you with this is Apple Customer Relations, call your local Apple contact number and ask for Customer Relations then explain your situation clearly and politely (be firm but don't rant).
    You might want to investiage what the local laws are regarding defective goods and 'fit for use' definitions on warranties etc. Consumer Protection can be a useful tool to use or bargain with if needed ...

Maybe you are looking for