<asp:GridView ID="grdPresentAddress" runat="server"
DataKeyNames="CustID,ClientID,AddressID" AutoGenerateColumns="false"
GridLines="None" ShowFooter="True"
>
<Columns>
<asp:TemplateField ItemStyle-Width = "400px" HeaderText = "Customer Name" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="lblContactName" runat="server"
Text='<%# Eval("ContactName")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtContactName" runat="server"
Text='<%# Eval("ContactName")%>' ></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtContactName" runat="server" Width="80%"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireInsertName" runat="server"
ControlToValidate="txtContactName"
Display="Dynamic"
SetFocusOnError="true" ValidationGroup="Test">*</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemStyle Width="400px" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "400px" HeaderText = "House Number/Name" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="lblHouseAddress" runat="server"
Text='<%# Eval("HouseAddress")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtHouseAddress" runat="server"
Text='<%# Eval("HouseAddress")%>' ></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtHouseAddress" runat="server" Width="80%"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireInsertHouseadd" runat="server"
ControlToValidate="txtHouseAddress"
Display="Dynamic"
SetFocusOnError="true" ValidationGroup="Test">*</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemStyle Width="400px" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "400px" HeaderText = "City" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="lblCity" runat="server"
Text='<%# Eval("City")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCity" runat="server"
Text='<%# Eval("City")%>' ></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCity" runat="server" Width="80%"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireInsertCity" runat="server"
ControlToValidate="txtCity"
Display="Dynamic"
SetFocusOnError="true" ValidationGroup="Test">*</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemStyle Width="400px" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "400px" HeaderText = "State" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="lblState" runat="server"
Text='<%# Eval("State")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtState" runat="server"
Text='<%# Eval("State")%>' ></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtState" runat="server" Width="80%"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireInsertState" runat="server"
ControlToValidate="txtState"
Display="Dynamic"
SetFocusOnError="true" ValidationGroup="Test">*</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemStyle Width="400px" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "400px" HeaderText = "Locality" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="lblLocality" runat="server"
Text='<%# Eval("Locality")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtLocality" runat="server"
Text='<%# Eval("Locality")%>' ></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtLocality" runat="server" Width="80%"></asp:TextBox>
<%-- <asp:RequiredFieldValidator ID="valRequireInsertLocality" runat="server"
ControlToValidate="txtLocality"
Display="Dynamic"
SetFocusOnError="true" ValidationGroup="Test">*</asp:RequiredFieldValidator>--%>
</FooterTemplate>
<ItemStyle Width="400px" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "400px" HeaderText = "Post Code" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:Label ID="lblPostCode" runat="server"
Text='<%# Eval("PostCode")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPostCode" runat="server"
Text='<%# Eval("PostCode")%>' ></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtPostCode" runat="server" Width="80%"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequireInsertPcode" runat="server"
ControlToValidate="txtPostCode"
Display="Dynamic"
SetFocusOnError="true" ValidationGroup="Test">*</asp:RequiredFieldValidator>
</FooterTemplate>
<ItemStyle Width="400px" />
</asp:TemplateField>
<asp:TemplateField>
<FooterTemplate>
<asp:Button ID="btnAddress" runat="server" Text="Add" CssClass="button" CommandName="AddAddressdetails" onclick="AddAddressdetails" ValidationGroup="Test" />
</FooterTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="grid_heading_left" />
<RowStyle CssClass="grid_row1" />
<AlternatingRowStyle CssClass="grid_row2" />
</asp:GridView>
No comments:
Post a Comment