Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version

Edit and Delete multiple Data in DataGrid in ASP.NET

, 18 Apr 2007
Edit and Delete multiple Data in DataGrid in ASP.NET
MultipleDeletionDatagrid.zip
MultipleDeletionDatagrid
user_db.mdb
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="DelhiApp.Testing.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1">
				<TR>
					<TD></TD>
				</TR>
				<TR>
					<TD>
						<asp:Panel id="Panel3" runat="server">Edit<BR>
<asp:DataGrid id="DataGrid2" runat="server" AutoGenerateColumns="False" GridLines="Vertical" CellPadding="3"
								BorderStyle="None" DataKeyField="empId" BorderWidth="1px" BorderColor="#999999"
								BackColor="White">
								<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#008A8C"></SelectedItemStyle>
								<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
								<ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
								<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#000084"></HeaderStyle>
								<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
								<Columns>
									<asp:BoundColumn DataField="empId" ReadOnly="True" HeaderText="Emp ID"></asp:BoundColumn>
									<asp:BoundColumn DataField="empName" HeaderText="Emp Name"></asp:BoundColumn>
									<asp:BoundColumn DataField="salary" HeaderText="Salary"></asp:BoundColumn>
									<asp:BoundColumn DataField="joiningDate" HeaderText="Joining Date "></asp:BoundColumn>
									<asp:EditCommandColumn ButtonType="PushButton" UpdateText="Update" HeaderText="Edit" CancelText="Cancel"
										EditText="Edit"></asp:EditCommandColumn>
									<asp:ButtonColumn Text="Delete" ButtonType="PushButton" HeaderText="Delete" CommandName="Delete"></asp:ButtonColumn>
									<asp:TemplateColumn HeaderText="Select">
										<ItemTemplate>
											<asp:CheckBox id="cbSelected" runat="server"></asp:CheckBox>
										</ItemTemplate>
									</asp:TemplateColumn>
								</Columns>
								<PagerStyle HorizontalAlign="Center" ForeColor="Black" BackColor="#999999" Mode="NumericPages"></PagerStyle>
							</asp:DataGrid>
      <P>
								<asp:Button id="Button2" runat="server" Text="Delete All"></asp:Button></P>
      <P>&nbsp;</P></asp:Panel></TD>
				</TR>
				<TR>
					<TD></TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

rahul_bit
Web Developer TATA Communications
India India
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141223.1 | Last Updated 19 Apr 2007
Article Copyright 2007 by rahul_bit
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid