View Single Post
  #1 (permalink)  
Old February 23rd, 2007, 02:16 PM
Posts: n/a
Default 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.