Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting data value in GridView.RowDeleting

Thread Tools

Getting data value in GridView.RowDeleting

David C
Posts: n/a
I am trying to get the DataKey value from the GridView during a RowDeleting
event but I am getting nothing returned in my strid variable. Below is part
of my code if someone can help. Thanks.

Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As
Dim strSQL As String = ""
Dim strText As String = ""
Dim row As GridViewRow = GridView1.Rows(e.RowIndex)

Dim strid As String = Convert.ToString(DataBinder.Eval(row.DataItem,

End Sub

Below is first part of my GridView

<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" BackColor="White"
BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
CellPadding="4" DataKeyNames="AssigneeID"
EmptyDataText="There are no Assignee records to display."
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<asp:CommandField ShowEditButton="True" >
<ItemStyle Width="70px" />
<asp:BoundField DataField="AssigneeID" HeaderText="ID"
ReadOnly="True" SortExpression="FileTypeID" Visible="False" />

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting pixel data from image as single value jimgardener Java 1 07-08-2008 08:52 PM
Getting ID, calling url, search for value, return value Tim Fröglich ASP .Net Web Services 1 01-10-2006 09:18 PM
Getting Value out of a data repeater checkbox ASP .Net 4 12-15-2005 07:30 PM
Getting value from asp:label into javascript input value Dwizz Javascript 10 08-07-2005 02:28 AM
Getting the data key field value when selecting a row in a datagrid... Stu ASP .Net 1 08-01-2003 07:32 PM