Hi gurus,
I modeled one of my apps after the dynamic row creation from one of the articles here.
The code snippet below shows an Add/Remove button controls on GridView.
<Columns>
<asp:TemplateField HeaderText="Income">
<ItemTemplate>
<asp:TextBox ID="txtspouseincome" placeholder="Income..." runat="server" style="width:250px;" class="form-control"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText=" ">
<ItemTemplate>
<asp:Button ID="ButtonAdd2" runat="server" Text="Add"
onclick="ButtonAdd2_Click" CssClass="grvAddButton" OnClientClick="return ValidateSPEmptyValue();" />
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowDeleteButton="True"><ControlStyle CssClass="grvDelButton" /></asp:CommandField>
</Columns>
Is it possible to hide the Delete button and only show it when the Add More button is clicked to add new row?
First row is added by default and new rows can be added by clicking the Add button contol. We would like to hide the delete button initially and only show it when a new row is added.
Thank you for your help