p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   GridView Delete Command (http://p2p.wrox.com/showthread.php?t=54507)

jamara February 23rd, 2007 02:16 PM

GridView Delete Command
 
Hi, I am trying to delete a row from a gridview. The question I have is how to extract the data from the gridrow to use in my delete statement. If I use
 "Dim Revision_number As String = CurrRow.Cells(2).Text"
I get the value '&nbsp' returned to my data element.
If I use "Dim Revision_number As String = CurrRow.Cells(2).ToString", I get "System.Web.UI.WebControls.GridViewRowCollecti on" returned to my data element. Both return an error message that the data value is too large.
As a test, I copied working code from my update subscript into my delete subscript and copied the update statement in the SQLdatasource to the delete statement in the same SQLdatasource. Same code but doesn't work for the delete option.
Can someone explain what the difference is? I do have reference materials and will gladly look up any topics suggested. I use Professional ASP.NET 2.0 extensively but didn't find it there.



All times are GMT -4. The time now is 09:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.