Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi- I'm trying to delete rows fr

Status
Not open for further replies.

gagz

Programmer
Nov 21, 2002
333
US
Hi-

I'm trying to delete rows from a datagrid (bound from a ds kept in session). I'm trying to access the rows data clicked on my the delete button via e.item.cells().Text. Here is my code:
Code:
Private Sub MeetingDetails_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles MeetingDetails.DeleteCommand
        
        Dim col1 As String = e.Item.Cells(0).Text
        Dim col2 As String = e.Item.Cells(1).Text
        Dim col3 As String = e.Item.Cells(2).Text
        Dim col4 As String = e.Item.Cells(3).Text
        Dim col5 As String = e.Item.Cells(4).Text
        Dim col6 As String = e.Item.Cells(5).Text
        Dim col7 As String = e.Item.Cells(6).Text

        'other stuff down below
End Sub

I've tried just printing the values into a textbox and they are empty...

I'm kicking off the deletecommand by clicking on :
Code:
<asp:ButtonColumn Text=&quot;Delete&quot; CommandName=&quot;Delete&quot;></asp:ButtonColumn>

the routine kicks off, but i'm trying to use the data from the selected row to match rows in the whole dataset, and I can't get access to the text... is there something that needs to be done as far as getting the datagrid row to be *selected*?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top