Custom GridView delete button
        Posted  
        
            by abatishchev
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by abatishchev
        
        
        
        Published on 2010-03-16T21:38:01Z
        Indexed on 
            2010/03/16
            21:41 UTC
        
        
        Read the original article
        Hit count: 332
        
How can I customize automatically generated command button, e.g. Delete?
I want to add a client confirmation on deleting and in the same moment I want this button would be generated on setting AutoGenerateDeleteButton="true". Is it possible??
I can add a custom button this way:
<asp:TemplateField>
    <ItemTemplate>
        <asp:LinkButton runat="server" CommandName="Delete" OnClientClick="return confirm('Delete?')">Delete</asp:LinkButton>
    </ItemTemplate>
</asp:TemplateField>
but it will be not automatically localized and will be not generated on setting AutoGenerateDeleteButton="true"!
© Stack Overflow or respective owner