G
Guest
Based upon some prevoius postings on what to do for adding a 'add' row to a
datagrid I utilize the footer to create the 'add' row. The only issue is that
I have it sharing the 'UpDate_Command' and I use an argument to difference
between an 'edit' vs. and 'add. But since I have field validation on both
'footer' and 'edit' columns I can't submit my edits since the footer
validation kicks in.If I take the validation off then the both work fine (an
insert or an update to record)
Add link:
<FooterTemplate>
<asp:LinkButton id="btnAddRow" runat="server" CssClass="gridqtext"
Text="<u>Add</u>" CommandName="Update" CommandArgument="Insert">
</asp:LinkButton>
</FooterTemplate>
edit links:
<asp:EditCommandColumn ItemStyle-Width="75" ItemStyle-CssClass="gridtext"
ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel"
EditText="Edit">
</asp:EditCommandColumn>
they are both sharing the:
Private Sub gdconcerndetail_UpdateCommand(ByVal source As System.Object,
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
gdconcerndetail.UpdateCommand
Ideas? Thanx.
datagrid I utilize the footer to create the 'add' row. The only issue is that
I have it sharing the 'UpDate_Command' and I use an argument to difference
between an 'edit' vs. and 'add. But since I have field validation on both
'footer' and 'edit' columns I can't submit my edits since the footer
validation kicks in.If I take the validation off then the both work fine (an
insert or an update to record)
Add link:
<FooterTemplate>
<asp:LinkButton id="btnAddRow" runat="server" CssClass="gridqtext"
Text="<u>Add</u>" CommandName="Update" CommandArgument="Insert">
</asp:LinkButton>
</FooterTemplate>
edit links:
<asp:EditCommandColumn ItemStyle-Width="75" ItemStyle-CssClass="gridtext"
ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel"
EditText="Edit">
</asp:EditCommandColumn>
they are both sharing the:
Private Sub gdconcerndetail_UpdateCommand(ByVal source As System.Object,
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
gdconcerndetail.UpdateCommand
Ideas? Thanx.