Adding a Blank Row to a DataGrid (Used to INSERT rather than UPDATE)
Details Related Types
Site:  DotNetJunkies
Original URL:  http://www.dotnetjunkies.com/Tutorial/C0DD0D9A-8907-4117-BBF2-4C407AA83574.dcik
Summary:
In this article we will be illustrating one way to add a blank row to a DataGrid. Why would you want to do this? Who knows, maybe to enable a user to add a new record. This article will show you how to add a new row to a DataGrid by manipulating its DataSource - in this example a DataTable. Note that we will be simulating saving the new item back to the database.
System.Data.DataRow
System.Data.DataSet
System.Data.DataTable
System.Data.SqlClient.SqlConnection
System.Data.SqlClient.SqlDataAdapter
System.EventArgs
System.Object
System.String
System.Web.UI.WebControls.DataGrid
System.Web.UI.WebControls.DataGridCommandEventArgs
System.Web.UI.WebControls.DataGridItem
System.Web.UI.WebControls.DataGridItemEventArgs
System.Web.UI.WebControls.EditCommandColumn
System.Web.UI.WebControls.LinkButton
System.Web.UI.WebControls.TextBox
System.Windows.Forms.DataGrid
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com