<asp:GridView ID="GvRegDtls" DataKeyNames="Pid" runat="server" AutoGenerateColumns="False" OnRowEditing="GvRegDtls_OnRowEditing"> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" /> <asp:CommandField ButtonType="Button" HeaderText="Edit" EditText="" CancelText="" DeleteText="" InsertText="" InsertVisible="False" NewText="" SelectText="" ShowCancelButton="False" UpdateText="" ShowEditButton="True" /> </Columns> </asp:GridView> --------------- in the above gridview , if i give name for command field's -- EditText , then if this commandfield( and normal button outside the grid is clicked),which triggers edit button(commandfield) to hide and automatically renders update & cancel button in that place. I don't require these button but i want to name the Command field button as Edit.
In save button click event add line gvFinancialdtls.EditIndex = -1; //Turn the Grid to read only mode BindGridView(); // Rebind GridView to reflect changes made
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)