Click here to Skip to main content
12,748,373 members (38,962 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads


41 bookmarked
Posted 14 Mar 2007

Edit and Delete multiple Data in DataGrid in ASP.NET

, 18 Apr 2007
Edit and Delete multiple Data in DataGrid in ASP.NET
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="DelhiApp.Testing.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
		<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="">
		<form id="Form1" method="post" runat="server">
			<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1">
						<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"
								<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>
									<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"
									<asp:ButtonColumn Text="Delete" ButtonType="PushButton" HeaderText="Delete" CommandName="Delete"></asp:ButtonColumn>
									<asp:TemplateColumn HeaderText="Select">
											<asp:CheckBox id="cbSelected" runat="server"></asp:CheckBox>
								<PagerStyle HorizontalAlign="Center" ForeColor="Black" BackColor="#999999" Mode="NumericPages"></PagerStyle>
								<asp:Button id="Button2" runat="server" Text="Delete All"></asp:Button></P>

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.


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


About the Author

Web Developer TATA Communications
India India
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170215.1 | Last Updated 19 Apr 2007
Article Copyright 2007 by rahul_bit
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid