Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 4th, 2005, 12:48 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert Fully Editable DataGrid To F Edit Gridview

I am trying to create a fullyeditable gridview in asp.net 2.0 To accomplish this in 1.1 you would do something like below.
How can this be accomplished in ASP.Net 2.0? I am not sure how to call my query commands etc.
HEre is how i would have done it in the past...
Code:
 Dim dgi as DataGridItem
For Each dgi in DGWeek.Items
  'Read in the Primary Key Field
  Dim id as Integer = DGWeek.Items.DataKeys(dgi.ItemIndex))
 Dim Tithe as Currency = dgi.FindControl("txtTithe"), TextBox).Text
  Dim Education as Currency = dgi.FindControl("txtEducation"), TextBox).Text

  'Issue an UPDATE statement...
 Dim updateSQL as String = "UPDATE Tithe SET Tithe = @Tithe, " & _
             "Education = @Education WHERE TRID = @TRID"
  SqlQuery.Parameters.Clear()
 SqlQuery.Parameters.Add("@Tithe", Tithe)
  SqlQuery.Parameters.Add("@Education", Education)

  SqlQuery.ExecuteNonQuery()
Next





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't read values from editable datagrid collie ASP.NET 1.x and 2.0 Application Design 5 May 9th, 2007 11:16 AM
Editable Gridview Shahzadcreative ASP.NET 1.0 and 1.1 Basics 0 November 6th, 2006 03:16 AM
editable datagrid column sarah lee ASP.NET 1.0 and 1.1 Basics 3 September 7th, 2006 02:45 PM
editable datagrid .............help maddy137 ASP.NET 1.0 and 1.1 Professional 0 May 17th, 2006 07:33 PM
DataKey error in Editable datagrid hoailing22 ASP.NET 1.0 and 1.1 Basics 2 June 10th, 2005 10:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.