How to use the update in gridview (and it's handlers) for a dynamicly increasing colmn's RRS feed

  • Question

  • hi
    I'm a beginner with asp.net/Microsoft sql server, and i need to use a gridview to display and edit a dynamic table which it's column's will be increasing daily for a class room attendance system.
    I used this sub to display the courses for a given lecturer (gridview1), who's already signed in, and when clicking on the select command button, the student's data in that course will appear in (gridview2).

    know here is the problem:
    i can't writ a proper handlers for the update command to edit the attendance of the student's.

    can any one help pleas

    Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged

            Dim RowNo As Integer = GridView1.SelectedIndex
            Dim CID, SID As String

            CID = GridView1.Rows(RowNo).Cells(1).Text
            SID = GridView1.Rows(RowNo).Cells(2).Text
            CourseAttendance = "C" & CID & "_" & SID
            'Dim SQLConn As New SqlConnection(connectionstring)
            Dim Cmd As New SqlCommand("select * from  " & CourseAttendance & " ", SQLConn)
                GridView2.DataSource = Cmd.ExecuteReader

            End Try

        End Sub
    Thursday, March 18, 2010 6:50 PM


All replies